sponsor Vim development Vim logo Vim Book Ad

columnMove.vim : move along vertical axis, to next/previous character-blocks end/start

 script karma  Rating 0/0, Downloaded by 2047  Comments, bugs, improvements  Vim wiki

created by
Rom Grk
 
script type
utility
 
description
(More readable readme on the repo)
https://github.com/romgrk/columnMove.vim

(Animated low-quality image)
https://raw.githubusercontent.com/romgrk/columnMove.vim/master/demo.gif

Move to the end/start of vertical block.

If the cursor is on a whitespace and/or virtual-column, moves to the next character in column that matches '\S' (any non-whitespace).
If the cursor is on a non-whitespace character, moves to the last character in column that matches '\S' before a '^$' (empty) match is found.

Consider the following text, with cursor starting at [x]; repeatedly pressing <Plug>ColumnMoveDown would take you to the marked positions.

" [.]..... ... ........ [.].... ... ...         [ ]
"                                                  
" 1.....................1......................1...
" ..........................................      
" 2.....................2......................2....
"                                                  
" 3..................
"       ..   ........   3....
" 4... ..    .... ..    ..................
" .... ..    .... ..    4...................
" .... ..                                                  
" .... ..                                                  
" .... ..                                                  
" .... ..... .... ..... 5.................
" 5... ..... .... ..... ...................  ....3...
"                       ....................  ....4...
"                       6..................
"EOF

Usage: (default mappings)

nmap gk    <Plug>ColumnMoveUp
nmap gj    <Plug>ColumnMoveDown
xmap <A-k> <Plug>ColumnMoveUp
xmap <A-j> <Plug>ColumnMoveDown
 
install details
Plug 'romgrk/columnMove.vim'

Plugin 'romgrk/columnMove.vim'

NeoBundle 'romgrk/columnMove.vim'
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
columnMove.zip 1.1 2016-06-12 7.0 Rom Grk fix v:true/v:false usage
columnMove.zip 0.9 2016-06-08 7.0 Rom Grk Initial upload
ip used for rating: 142.132.191.50

Questions about Vim should go to the maillist. Help Uganda.     Vim at Github