Last Updated: February 25, 2016
·
480
· sadasant

Interact with the clipboard from VIM

Sometimes you want to paste something in vim but you know some of your imaps are going to break the paste, what to do? Well, if you have xclip in your box, you can do this:

" <Tab>< Yank to xclip
" <Tab>> xclip to yank
nmap <Tab>< :call system('xclip', @0)<cr>
nmap <Tab>> :let @" = system('xclip -o')[0:]<cr>

// Testing coderwall's tips