Vim Kung-Fu
29 Mar 2012It’s almost been a year, I have grown from a mediocre to a novice of Vim. And everyday I am learning something new. Starting from it’s powerful mapping tool to it’s ubiquitous plugging which makes it as world’s best IDE (according to me), Vim has been able to survive the ice age along with few reptiles. With many modern text editors with fancy features threatening it’s existence, Vim has been able to maintain it’s fab amongst it’s dedicated fans and followers.
Here are list of plug-ins and tools I use in Vim and I would like to share in this post.
Pathogen
Pathogen helps to manage all the plugins. Here’s a way to install Pathogen in your system
Installation
mkdir .vim
git clone git://github.com/tpope/vim-pathogen.git pathogen
mv pathogen/autoload ~/.vim/autoload
Now edit your .vimrc and add following lines to the top
call pathogen#runtime_append_all_bundles()
call pathogen#helptags()
Now any plugins you want to intall, you can simply copy to ~/.vim/bundle
DelimitMate
DelimitMate provides automatic closing of quotes, parenthesis, brackets, etc. It’s something that will make you lazy and helps you sometimes to save some braincells.
Installation
cd ~/.vim
git submodule add git://github.com/Raimondi/delimitMate.git bundle/delmitmate
git submodule init && git submodule update
Usage
:help delimitMate
NERDCommenter
It provides bunch of key mapping for very fast and efficient code commenting
Installation
cd ~/.vim
git submodule add git://github.com/scrooloose/nerdcommenter.git bundle/nerdcommenter
git submodule init && git submodule update
Usage
:help NERDCommenter
Tab to Space
Actually this is not a plugin, but a set of addons to the .vimrc that will do that trick. Add following lines to the ~/.vimrc, which will convert Tabs to the Spaces
set expandtabset
set tabstop=4set
set shiftwidth=4
SuperTab
This is one of best AutoComplete utility I found in ViM
Installation
Download supertab.vba and open it (vim supertab.vba) Source the code using (:so%)
Using Folds
Using Folds is great way to manage your code and apply certain changes to the part of the code. Here’s a man page VIM-Fold ManPage VIM-Fold
Tweet Follow @aayushtuladhar