1
0
mirror of https://git.decapod.one/brethil/dotfiles synced 2024-11-22 11:31:30 +01:00

vim: fix copy/paste shortcuts

use map instead of noremap so that <leader>Y can be also used
in visual mode
This commit is contained in:
bretello 2021-04-11 18:50:02 +02:00
parent 7f2e0333fd
commit 9ac97f0af7
Signed by: brethil
GPG Key ID: 876AAC6290170FE7

View File

@ -1,7 +1,7 @@
"""" Leader shortcuts """" Leader shortcuts
let mapleader = "," let mapleader = ","
" also use space as leader " also use space as leader
nmap <Space> <leader> map <Space> <leader>
nmap <leader>w :w!<CR> nmap <leader>w :w!<CR>
command! W execute 'w !sudo tee % > /dev/null' <bar> edit! command! W execute 'w !sudo tee % > /dev/null' <bar> edit!
@ -129,8 +129,8 @@ elseif s:uname == "Linux"
autocmd TextYankPost * call s:WaylandYank() autocmd TextYankPost * call s:WaylandYank()
augroup END augroup END
nnoremap "+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'), '<C-v><C-m>', '', 'g') \| exec 'normal! ' . v:count1 . 'p'<cr>
nnoremap "+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'), '<C-v><C-m>', '', 'g') \| exec 'normal! ' . v:count1 . 'P'<cr>
else else
"" Unknown platform "" Unknown platform
endif endif