I prefer my default vim clipboard to be the system clipboard:
set clipboard=unnamed
Being able to yank and then paste in other software (or vice versa) is pretty handy.For me, p is for pasting between open buffers, and <leader>p is for pasting between programs. This way you can paste from an open buffer, and paste from the system clipboard with no go-between.
vimrc:
" copy to clipboard
map <leader>y "+yy
" paste from clipboard
map <leader>p "+p
Re:Textmate to VIM
by crazydiamond on Sunday November 11, 2012 @07:55AM
(#4769389)
Thanks, this answers my previous point, of having set clipboard push every delete/cut into the clipboard.
In addition, I found this:
vmap <C-c> "+y
Re:Textmate to VIM
by johncoltrane on Tuesday November 13, 2012 @04:59AM
(#4777247)
set clipboard=unnamed
breaks a few register operations. You should use set clipboard+=unnamed
instead.
Re:Textmate to VIM
by crazydiamond on Sunday November 11, 2012 @03:29AM
(#4769064)
This is nice, except that every cut gets added to the clipboard. Including deleting an individual character. Deleting/cleaning up text ... it all goes into the clipboard. Soon my clipboard is full of junk.
I'd have liked only yanked stuff going onto the clipboard, not deleted stuff.
Re:Textmate to VIM
by johncoltrane on Tuesday November 13, 2012 @05:03AM
(#4777258)
"_
is the "blackhole" register.Add these lines to your ~/.vimrc:
nnoremap <leader>d "_d
vnoremap <leader>d "_d
and enjoy "real" deletion.
cmd-c is "*yy in vim. Just yy writes to vim's internal clipboard, not to the system clipboard.