Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Add highlight & blink on matched item in buffer #320

Closed
xaljer opened this issue May 8, 2019 · 7 comments
Closed

[Feature request] Add highlight & blink on matched item in buffer #320

xaljer opened this issue May 8, 2019 · 7 comments

Comments

@xaljer
Copy link

xaljer commented May 8, 2019

In Leaderf rg/gtags, etc. , matched item is highlighted in Leaderf window, but isn't in current buffer.
I think it's more convenient if Leaderf can highlight the matched item in current buffer, especially when i preview many results.
I can use below way to achieve this:
nnoremap <Leader>fw :match Cursor '<C-R><C-W>'<CR> :<C-U><C-R>=printf("Leaderf! rg --wd-mode Ac -w --match-path -e %s ", expand("<cword>"))<CR><CR>
and behavior of :match is exactly what i want. But the only issue is i can't spec the priority of :match, i want this highlight has lower priority. (Maybe i am wrong, I'm not familiar with vim commands, but if I'm right, I have to use matchadd(), more complex. So, I think maybe Leaderf can support this by itself, and do better.)

In addition, I saw Emacs (I don't know what plugin) can blink the line when jump to a symbol. I think it's also a good way to get the position easier after jump.

@Yggdroot
Copy link
Owner

LeaderF has already been able to blink the line when jump to a symbol.

@xaljer
Copy link
Author

xaljer commented May 11, 2019

I don't see blink effect on Leaderf gtags -d?

@Yggdroot
Copy link
Owner

lfCmd("setlocal cursorline! | redraw | sleep 20m | setlocal cursorline!")

Replace the 20m with 200m, to see if it is the effect you want.

@xaljer
Copy link
Author

xaljer commented May 14, 2019

no,I try to adjust that value, but I don't get what i want. I don't find a gif to show the effect.

@Yggdroot
Copy link
Owner

aaa

Is this what you want?

@xaljer
Copy link
Author

xaljer commented May 18, 2019

Yes, it like virtual bell?

@Yggdroot
Copy link
Owner

This is the effect of sleeping 200ms.

Yggdroot added a commit that referenced this issue May 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants