diff options
author | Teddy Wing | 2014-06-06 00:41:47 -0400 |
---|---|---|
committer | Teddy Wing | 2014-06-06 00:41:47 -0400 |
commit | 320e54ce8d0109bce251acbbe457402aa1c2a059 (patch) | |
tree | c9546116cc693652511a4653164eaa0bbe746163 /vimrc | |
parent | e05f4fd92940b839c6aaf0ca279a1353825783a7 (diff) | |
download | dotvim-320e54ce8d0109bce251acbbe457402aa1c2a059.tar.bz2 |
vimrc: mapping to copy text to OS X clipboard
Since I'm using OS X's stock vim which isn't compiled with clipboard
support, add a command to copy text to the clipboard. Useful when split
windows are open or when I want to copy an entire file that takes up
more than a single terminal page.
Diffstat (limited to 'vimrc')
-rw-r--r-- | vimrc | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -198,6 +198,10 @@ " * Map 0 -> g0 and $ -> g$ plus the reverse. Makes it easier to get to " the beginning & end of a soft wrapped line. " +" 2014.06.06: +" * Add Visual mode mapping to copy selected text to the OS X clipboard +" since I'm using stock vim not compiled with clipboard support. +" " Pathogen @@ -506,6 +510,10 @@ nnoremap [q :cprevious<cr> " Set scrollbind on a window nnoremap <leader>sb :setlocal scrollbind!<cr> +" Copy to OS X clipboard from visual mode +" http://stackoverflow.com/a/17126375 +vnoremap <leader>c !tee >(pbcopy)<cr> + " Commands |