quick-scope icon indicating copy to clipboard operation
quick-scope copied to clipboard

E227: mapping already exists for f

Open ekaunt opened this issue 4 years ago • 9 comments

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

ekaunt avatar Mar 31 '20 18:03 ekaunt

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

bradford-smith94 avatar Mar 31 '20 20:03 bradford-smith94

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

ekaunt avatar Apr 01 '20 18:04 ekaunt

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

bradford-smith94 avatar Apr 03 '20 22:04 bradford-smith94

Same problem here, conflicts with vim-sneak, nice feature but I need sneak as well image

the lazy loading helps a lot with long lines/performance

dseeni avatar Apr 04 '20 22:04 dseeni

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

againxx avatar May 04 '20 08:05 againxx

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

ayyess avatar May 16 '20 23:05 ayyess

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 avatar May 17 '20 13:05 againxx

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.

againxx avatar May 29 '20 15:05 againxx

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

thepenguinthatwants avatar Jun 21 '20 18:06 thepenguinthatwants

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

bradford-smith94 avatar Jun 22 '21 22:06 bradford-smith94