folke / flash.nvim

Navigate your code with search labels, enhanced character motions and Treesitter integration
Apache License 2.0
2.22k stars 27 forks source link

feature: Clear search highlights with CTRL-L #306

Closed zoriya closed 6 days ago

zoriya commented 5 months ago

Did you check the docs?

Is your feature request related to a problem? Please describe.

The default CTRL-L command on vim is used to redraw the screen and clear highlights.

Describe the solution you'd like

Flash's highlights should also get cleared when this key is pressed. (I guess from here, but I did not try to fix it, I could write a PR if you want)

Describe alternatives you've considered

Manually map CTRL-L to clear flash, but there is no API to clear flash highlights.

Additional context

No response

GustafB commented 6 days ago

+1 for having a way to clear the search highlights

folke commented 6 days ago

highlights are cleared with <esc>, not <ctrl-l>

GustafB commented 6 days ago

Afaict (very possible I've misconfigured something) the highlights from search are indeed cleared, but not from {f, F, t, T}.

Thanks for the prompt response @folke, love your work!

Here's a quick screenshare

WindowsTerminal_A94q84mGIT