Closed pirj closed 10 years ago
Hi, @pirj. Sorry for the delay to catch this issue.
You can use <Plug>(clever-f-reset)
.
Please write below setting in your vimrc to reset the state on <Esc>
.
nmap <Esc> <Plug>(clever-f-reset)
Works like a charm, thanks. "d0" action issue is still the case though.
nmap <Esc> <Plug>(clever-f-reset)
is adding an odd side effect: when you open a file from CL like vim .xinitrc
and then jump somewhere, it removes until that point. So G
removes to the end of file. No other side effects spotted.
"d0" action is not a bug. clever-f checks if should repeats previous search or not by the character under the cursor and the place of cursor. The check by only the character of under the cursor would make more mistakes; If the character is the same previous place you used clever-f accidentally, f
moves cursor unexpectedly.
nmap <Esc> <Plug>(clever-f-reset)
is adding an odd side effect: when you open a file from CL like >vim .xinitrc
and then jump somewhere, it removes until that point. So G removes to the end of file.
I can't reproduce the issue. Could you please tell me the precondition ( e.g. .vimrc
)?
All here. I've narrowed it down to just Vundle, set nocompatible
and clever-f (with that nmap), and now when I start up vim, it's in REPLACE mode. If I comment nmap out, it's starting in NORMAL.
Sorry for massive delay to respond.
I tried for reproduction but I couldn't. I want to investigate more but you no longer seem to use clever-f.vim. So I will close this issue. Sorry again.
If anyone can reproduce the above issue, please reopen this issue and report it.
I've found Vim's bug which makes Vim start in replace mode.
https://groups.google.com/forum/#!topic/vim_dev/06REeb0ev2I/discussion
If your Vim doesn't have patch-389, please try to update Vim. You can check if your Vim has patch-389.
:echo v:version == 704 && has('patch389')
Is there a quick option to make clever-f forget about the character to search not only on movement, but also on Esc. After all, 'f' is not so consistent when:
This is as expected (cursor stays still), but:
In this case cursor moves and clever-f won't find next match anymore.
Would be nice if there were an option not to rely on previous_pos, and just reset clever-f on Esc (or C-f?).
I have tried, but my VimL skills are poor.