Created
September 6, 2013 09:38
-
-
Save kates/6461653 to your computer and use it in GitHub Desktop.
vim copy/paste to system clipboard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let os = substitute(system('uname'), "\n", "", "") | |
if os == "Darwin" | |
vmap <C-c> y:call system("pbcopy", getreg("\""))<CR>:echo "copied to system clipboard"<CR> | |
nmap <C-v> :call setreg("\"", system("pbpaste"))<CR>p:echo ""<CR> | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment