Created
January 17, 2014 17:46
-
-
Save sjl/8477971 to your computer and use it in GitHub Desktop.
Zip Right Vim mapping
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
" Zip Right | |
" | |
" Moves the character under the cursor to the end of the line. Handy when you | |
" have something like: | |
" | |
" foo | |
" | |
" And you want to wrap it in a method call, so you type: | |
" | |
" println()foo | |
" | |
" Once you hit escape your cursor is on the closing paren, so you can 'zip' it | |
" over to the right with this mapping. | |
" | |
" This should preserve your last yank/delete as well. | |
nnoremap zl :let @z=@"<cr>x$p:let @"=@z<cr> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment