unblevable / quick-scope

Lightning fast left-right movement in Vim
MIT License
1.43k stars 54 forks source link

E227: mapping already exists for f #55

Open ekaunt opened 4 years ago

ekaunt commented 4 years ago

when i add

let g:qs_highlight_on_keys = ['f', 'F', 't', 'T']

to my vimrc, i get an error

~ > vim .vimrc
Error detected while processing ~/.vim/plugged/quick-scope/plugin/quick_scope.vim:
line   66:
E227: mapping already exists for f
Press ENTER or type command to continue

then it only highlights for f, but not for F, t, or T

bradford-smith94 commented 4 years ago

What is the output of :verbose map f without the let g:qs_highlight_on_keys line in your vimrc?

ekaunt commented 4 years ago
o  f             YRMapsExpression("<SNR>29_", "f", 1)                                      
        Last set from ~/dotfiles/.vim/plugged/YankRing.vim/plugin/yankring.vim line 1712

guess its a problem with yankring.vim conflicting, huh

bradford-smith94 commented 4 years ago

Seems like it, I'm not sure if there is any way around this.

againxx commented 4 years ago

An other problem with vim-sneak, after I press s/S to invoke vim-sneak. The ;/, key can only be used to repeat last sneak search, not the quick-scope f/F/t/T one, even after I pressed f/F/t/T again.

It turns out that vim-sneak has a reset function which will be called after native f/F/t/T is pressed. Would it be possible for quick-scope to provide a way to call that function? A reference from vim-sneak

ayyess commented 4 years ago

An other problem with vim-sneak, after I press s/S to invoke vim-sneak. The ;/, key can only be used to repeat last sneak search, not the quick-scope f/F/t/T one, even after I pressed f/F/t/T again.

It turns out that vim-sneak has a reset function which will be called after native f/F/t/T is pressed. Would it be possible for quick-scope to provide a way to call that function? A reference from vim-sneak

You can reset sneak in quick_scope#Ready(): https://github.com/ayyess/quick-scope/commit/a40654d60dfabd2408e5c8506107e653fa237581

againxx commented 4 years ago

An other problem with vim-sneak, after I press s/S to invoke vim-sneak. The ;/, key can only be used to repeat last sneak search, not the quick-scope f/F/t/T one, even after I pressed f/F/t/T again. It turns out that vim-sneak has a reset function which will be called after native f/F/t/T is pressed. Would it be possible for quick-scope to provide a way to call that function? A reference from vim-sneak

You can reset sneak in quick_scope#Ready(): ayyess@a40654d

Thank you! It works great!

againxx commented 4 years ago

An other problem with vim-sneak, after I press s/S to invoke vim-sneak. The ;/, key can only be used to repeat last sneak search, not the quick-scope f/F/t/T one, even after I pressed f/F/t/T again. It turns out that vim-sneak has a reset function which will be called after native f/F/t/T is pressed. Would it be possible for quick-scope to provide a way to call that function? A reference from vim-sneak

You can reset sneak in quick_scope#Ready(): ayyess@a40654d

FYI, this patch will break f and t in macro, maybe there can be some improvement.

thepenguinthatwants commented 4 years ago

Seems like this happens also with plugin. rhysd /clever-f.vim

bradford-smith94 commented 3 years ago

Has anyone else following this issue tried out the patch in #73?