Vim commands for developers, Part 2
18.09.2010 09:08
The longer I work with Vim, the more great stuff I discover. Here’s another chunk.
Did you know there are so many ways to go to insert mode?
i, a– insert before/after current characterI, A– insert at the beginning/end of the lineO, o– insert a line before/after current linegi– go to Insert mode where you last stopped editing
Behold – Folding!
zf– fold selected block:{range}fo[ld]zo– open fold:{range}foldo[pen]
Ever changed your .vimrc and had to close Vim to load it? Well no need for that any more!
:source $MYVIMRC
And our plugin of the day is… NERDTree! NERDTree is a project file browser, very useful!
Commands:
:NERDTree [start-dir|bookmark] # opens NERDTree :NERDTreeToggle [start-dir|bookmark] :NERDTreeClose :NERDTreeFind # find current file in tree
o, go # open / open and leave cursor in NERDTree t, T # open in new tab / open in tab and keep focus on current tab i, gi # split window s, gs # vsplit window
Also – you do know about Pathogen, right?
If you missed out on Vim commands for developers, Part 1, here it is.

* hxxp://github.com/nelstrom/dotfiles/
* hxxp://cream.sourceforge.net/
Cheers! ;)