rhysd / clever-f.vim

Extended f, F, t and T key mappings for Vim.
https://rhysd.github.io/clever-f.vim
1.01k stars 44 forks source link

Making semicolon behaving like f/t? #39

Closed Huxpro closed 6 years ago

Huxpro commented 6 years ago

Many vimers might have got used to type ; for repeating after forward or toward. So It might be reasonable to map ; with same behaviour as well?

Any thoughts?

rhysd commented 6 years ago

If you use ; for repeating previous search, I think you don't need to use this plugin. You can use original f/t. Isn't it sufficient?

Huxpro commented 6 years ago

@rhysd this plugin obviously provides better functionalities e.g. highlighting, searching across lines than ;. But this plugin also disable ;. So I was thinking mapping old habits (;) with better functionaliies this plugin provided might not be a bad idea

rhysd commented 6 years ago

Thank you for your explanation. I understand your use case. You want to use this plugin but want to continue to use ; rather than repeatable f/t. I think <Plug>(clever-f-repeat-forward) is available for your use case (and <Plug>(clever-f-repeat-forward) for moving backward if you want).

Please try:

map ; <Plug>(clever-f-repeat-forward)
Huxpro commented 6 years ago

Thx @rhysd, this works perfectly for me 👍 Another reason for me doing this is that I also use vim via plugins in other editors (VSCode, Atom, Idea) where clever-f is not existing. By continuing to use ; and ,, I can treat clever-f as an incremental enhancement for my native vim and not breaking habits in other place. 😎

I have post a PR for adding this tips in #40 BTW 😄