# HG changeset patch # User Steve Losh # Date 1313600806 14400 # Node ID 61543c43271e93574a90f5b826f74a7e1a15cc1d # Parent c14b8d8f42b566c37d60712c612f31725e1560f5 Docs. diff -r c14b8d8f42b5 -r 61543c43271e vim/.vimrc --- 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 "_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/[^ ]"zd$jyyP^v$h"zpJk:s/\v +$//:nohj^ " }}}