Closed ranelpadon closed 1 year ago
You can do both :noh
and resetting highlights.
nnoremap <Esc> :noh<CR>:call clever_f#reset()<CR>
Automatically mapping it to <Esc>
causes many issues across other plugins which also use <Esc>
so this plugin does not map it by default. But you can configure it in your .vimrc
.
@rhysd This works! Thanks for the brilliant tip! Will close this issue now. :)
I have this mapping to clear/reset the Vim's search results highlights (i.e. when using
/
):So, I'm thinking if it's possible to use the
<Esc>
key also to reset theclever-f
highlights instead of using the cursor keys?I think it's better UX than using
g:clever_f_highlight_timeout_ms
since sometimes you're not done yet, but the highlight will be auto-cleared. Clearing it on-demand offers more timing control. I think<Esc>
is also a natural choice since it's kinda escaping theclever-f
(find) mode.BTW, thanks a lot for this useful/practical plugin! :)