vim clipboard one-liners

in code

Yank and replace all lines in a file without consuming the clipboard.

" Quickly yank all lines in the file.
nmap <leader>yy :%y+<cr>
" Replace all lines in the file with the contents of the clipboard.
nmap <silent><leader>rp gg"_dGVp

March 20

in me

Your email address will not be published. Required fields are marked *