10 years ago
Use Ctrl+p to swap the current line with the line you have in the register, this allows you to swap lines around very quickly without worrying about deleting lines that mess up what you had in your register.
Works best after a yy or dd, gets weird results otherwise.
" Substitute current line out with copy/paste register and leave that line in the register nnoremap <C-P> pkdd
Chris Penner 10 years ago
Oh! Very nice, didn't think of that!
Martin Kopischke 10 years ago
Vp
will achieve the exact same result without forcing you to use a chord.