fix the clipboard of vim

This commit is contained in:
kuoi 2022-06-27 00:32:39 +01:00
parent ade903e01a
commit 8770b6b12f

View file

@ -47,12 +47,14 @@ augroup resCur
autocmd BufReadPost * call setpos(".", getpos("'\"")) autocmd BufReadPost * call setpos(".", getpos("'\""))
augroup END augroup END
" 快捷键设置 " 快捷键设置
vmap <C-c> "+y y:call system("wl-copy", @")<cr> vmap <C-c> "+y
nmap <C-v> "+p :let @"=substitute(system("wl-paste --no-newline"), '<C-v><C-m>', '', 'g')<cr>p map <C-v> "+p
nmap <C-v> "*p :let @"=substitute(system("wl-paste --no-newline --primary"), '<C-v><C-m>', '', 'g')<cr>p imap <C-v> <C-r>+
imap <C-v> <ESC>"+p :let @"=substitute(system("wl-paste --no-newline"), '<C-v><C-m>', '', 'g')<CR>p vmap <C-x> "+d
vmap <C-x> "+c vmap <C-s> <ESC>:w<CR>
nmap <C-s> :w<CR>
imap <C-s> <ESC>:w<CR> imap <C-s> <ESC>:w<CR>
vmap <C-q> <ESC>:wq<CR>
nmap <C-q> :wq<CR> nmap <C-q> :wq<CR>
imap <C-q> <ESC>:wq<CR> imap <C-q> <ESC>:wq<CR>
nmap <C-a> ggVG<CR> nmap <C-a> ggVG<CR>