Pages

7/05/2012

Vim plugins

Vim has countless plugins that extend the built-in functionality. One great place to download plugins is from the vim.org website ( http://www.vim.org/scripts/index.php ). Although, I must admit that it's not very easy to discover new plugins there (you almost have to know what plugin you are looking for in order to find it on the vim.org website). For that reason, I am publishing a list of some of my favorite plugins.

Taglist

Source code browser - shows an overview of the source code structure (by file) and allows you to quickly jump to specific items. (Note, this plugin relies on Exuberant Ctags)
http://www.vim.org/scripts/script.php?script_id=273

Gtags

I use Gnu Global as a source code tagging system (instead of Exuberant Ctags). It is really quite handy, allowing quick navigation to function/ class references to their definitions (and back).
Please see http://wadeberrier.blogspot.com/2012/04/source-code-navigation-with-vim.html for a refence on how to set it up.
Download Gnu Global at http://www.gnu.org/software/global/

Setcolor

Allows for quick/easy colorscheme switching. I used this a lot to finally settle on my favorite colorschemes. There are some languages for which I prefer different color schemes - in these cases, this plugin is very convenient. Currently, my favorite colorschemes are 256-jungle, jellybeans, and spiderhawk.
http://vim.wikia.com/wiki/Switch_color_schemes

A

This simple plugin allows you to quickly swtich between source files and header files (C / C++). The default keybinding to switch is :A, and :AT will open it in a new tab.
http://www.vim.org/scripts/script.php?script_id=31

Vim Tutorial

Vi (and Vim) are text editors that have been around for a very long time. One can find Vi on almost any Unix system. While I prefer to develop software with a graphical IDE (such as Eclipse and Visual Studio), it has proven very beneficial for me to learn how to use Vi.

For anyone interested in learning how to use Vi / Vim, the best tutorial I have found is at http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html . It has a series of screenshots highlighting what important keys do. (A pdf version can be found at http://www.glump.net/dokuwiki/howto/vim_graphical_cheat_sheet ). I like to print off the master cheat sheet and keep it close to my computer for quick reference.

Note that there are many features to Vi / Vim that are not covered in the tutorial - it is a really powerful/feature-packed editor that cannot be covered in a simple tutorial.