File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -161,8 +161,12 @@ function! yankstack#setup()
161161 let word_characters = split (" qwertyuiopasdfghjklzxcvbnm1234567890_" , ' \zs' )
162162
163163 for key in g: yankstack_yank_keys
164- exec ' nnoremap <expr>' key ' <SID>yank_with_key("' . key . ' ")'
165- exec ' xnoremap <expr>' key ' <SID>yank_with_key("' . key . ' ")'
164+ if maparg (key , " x" ) != " "
165+ echom " The key " . key . " is already mapped as " . maparg (key , " x" )
166+ echom " See https://github.com/maxbrunsfeld/vim-yankstack/issues/18 for details"
167+ endif
168+ exec ' nnoremap <unique> <expr>' key ' <SID>yank_with_key("' . key . ' ")'
169+ exec ' xnoremap <unique> <expr>' key ' <SID>yank_with_key("' . key . ' ")'
166170 endfor
167171
168172 let clear_cmd = ' :echo ""<CR>'
You can’t perform that action at this time.
0 commit comments