61543c43271e

Docs.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Wed, 17 Aug 2011 13:06:46 -0400
parents c14b8d8f42b5
children 9cb9df3cc3f1
branches/tags (none)
files vim/.vimrc

Changes

--- a/vim/.vimrc	Wed Aug 17 11:18:42 2011 -0400
+++ b/vim/.vimrc	Wed Aug 17 13:06:46 2011 -0400
@@ -556,7 +556,25 @@
 " Replaste
 nnoremap <D-p> "_ddPV`]
 
-" Splitjoin
+" Split/Join
+" ----------
+"
+" Basically this splits the current line into two new ones at the cursor position,
+" then joins the second one with whatever comes next.
+"
+" Example:                      Cursor Here
+"                                    |
+"                                    V
+" foo = ('hello', 'world', 'a', 'b', 'c',
+"        'd', 'e')
+"
+"            becomes
+"
+" foo = ('hello', 'world', 'a', 'b',
+"        'c', 'd', 'e')
+"
+" Especially useful for adding items in the middle of long lists/tuples in Python
+" while maintaining a sane text width.
 nnoremap K h/[^ ]<cr>"zd$jyyP^v$h"zpJk:s/\v +$//<cr>:noh<cr>j^
 
 " }}}