Adds vertical move motions to vim. These move a cursor 'up' or 'down' as many lines as possible without changing the cursor column. With these motions - cursor always stays in the same column! These are especially useful in visual-block mode.
These motions are a bit hard to verbally explain, so be sure to check the animated examples below.
[v
- moves 'up' as many lines as possible without changing the cursor column]v
- moves 'down' as many lines as possible. Also doesn't change the cursor column
-
Problem scenario: selecting a block of text with vertical movements with vanilla vim (vim-vertical-move not installed). Notice how the cursor column position is lost when using the original paragraph motion
}
.
-
Solution using vim-vertical-move: pressing
]v
the cursor moves 'down' as many lines as possible, without changing the cursor column.
-
Pathogen
git clone git://github.com/bruno-/vim-vertical-move.git ~/.vim/bundle/vim-vertical-move
-
Vundle
Plugin 'bruno-/vim-vertical-move
-
vim-plug
Plug 'bruno-/vim-vertical-move
Patches are contributions are welcome.
This plugin has a decent vspec test coverage. If your patch is non-trivial, please write tests for it.
For instructions how to run and write tests see :h vertical-move-contributing
.