Open ram02z opened 3 years ago
Hack I did was just add :noh<CR>
at the end of it. Would be nice to not have to do that though.
That hack was the exact configuration that I attempted in my own vimrc, before I even saw this open issue, and it didn't work for me. I tried both :noh<CR><Plug>(clever-f-reset)
and <Plug>(clever-f-reset):noh<CR>
.
I did a little bit of debugging. In my case, I noticed that the function clever_f#reset()
in "autoload/clever_f.vim" returns an empty string (''
). Changing its return value to a non-empty string that does a no-op, such as return "\<Esc>"
, works for me.
Alternatively, bypass the <Plug>
mapping, and call the reset function directly, that is
nnoremap <Esc> :<C-u>call clever_f#reset()<CR>
I have the following map in my config:
nmap <Esc> <Plug>(clever-f-reset)
Moving the cursor resets the highlights, but pressing
<Esc>
doesn't. However, it does reset the searching character.