vim: cleanup clipboard shortcuts

master
bretello 2024-03-21 14:55:06 +01:00
parent 0c7d0ec24f
commit 5674865f11
Signed by: brethil
GPG Key ID: 876AAC6290170FE7
1 changed files with 1 additions and 3 deletions

View File

@ -135,15 +135,13 @@ elseif g:uname ==? 'Linux'
"" Linux specific stuff
xnoremap "+y y:call system("wl-copy", @")<cr>
map "+p :<C-U>let @"=substitute(system('wl-paste --no-newline'), '<C-v><C-m>', '', 'g') \| exec 'normal! ' . v:count1 . 'p'<cr>
map "*p :<C-U>let @"=substitute(system('wl-paste --no-newline --primary'), '<C-v><C-m>', '', 'g') \| exec 'normal! ' . v:count1 . 'P'<cr>
else
"" Unknown platform
endif
" Add shortcuts to yank/paste to unnamed/unnamedplus clipboards
map <Leader>y "+y
map <Leader>p "+P
map <Leader>P "*p
map <Leader>p "+p
map <Leader>yp <Plug>yankstack_substitute_older_paste
map <leader>yn <Plug>yankstack_substitute_newer_paste