Separating methods with 2 empty lines makes code not only more readable, it also allows Vim users to jump to the next/previous method using this plugin.
This is a normal Vim plugin. Install it like you install all your other plugins.
- add
Bundle 'kevgo/jumbo'
to your .vimrc file - restart Vim and run
:BundleInstall
git clone git://github.com/kevgo/jumbo.git ~/.vim/bundle
- restart Vim
Jumbo provids the two VimL methods JumpToNextMethod
and JumpToPreviousMethod
,
which do exactly what their name says.
To replace the normal {
and }
commands with Jumbo, add this to your .vimrc
file:
nnoremap { :call JumpToPreviousFunction()<CR>
nnoremap } :call JumpToNextFunction()<CR>