Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions autoload/yankstack.vim
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,12 @@ function! yankstack#setup()
let word_characters = split("qwertyuiopasdfghjklzxcvbnm1234567890_", '\zs')

for key in g:yankstack_yank_keys
exec 'nnoremap <silent> <expr>' key '<SID>yank_with_key("' . key . '")'
exec 'xnoremap <silent> <expr>' key '<SID>yank_with_key("' . key . '")'
if maparg(key, "x") != ""
echom "The key " . key . " is already mapped as " . maparg(key, "x")
echom "See https://github.com/maxbrunsfeld/vim-yankstack/issues/18 for details"
endif
exec 'nnoremap <unique> <expr>' key '<SID>yank_with_key("' . key . '")'
exec 'xnoremap <unique> <expr>' key '<SID>yank_with_key("' . key . '")'
endfor

for key in paste_keys
Expand Down