VIM is the infamous text editor(only?, think again!) which I was scared to use initially. It is too overwhelming for new programmers. Fortunately, or unfortunately, I had to do software development and testing inside a Virtual Machine for a particular Open Source software. When I say inside a VM, basically, all I get is the shell of that machine.
Now, there are holy wars fought around the world for choosing the best among them. I’m not going into that. I’ll let you choose for yourself. Here, I chose Vim as my primary editor. Vim is highly configurable and powerful. There are tons of smart programmers who have written various plugins for making Vim awesome.I, here, have tried to configure it according to my use. This configurations will evolve as time progresses. Let us first go through the initial steps to get started, after which we can get into the details.
Note: I’ve used it only in OSX and debian based Linux distro. I use iTerm2 in Mac and for linux, I SSH into the Virtual Machine. Make sure that VIM
version >= 7.0.
$ git clone https://github.com/souravchk/dotfiles.git
$ cat dotfiles/vimrc > ~/.vimrc
Simply paste this file into
~/.vimrc file is the configuration file for vim. Whenever vim starts up, it is going to behave in the way this files tells it to. All the commands settings and the plugins that we will use, will be stated in this file. Now that we have the vimrc file, let us do the needful to download the plugins.
- For managing our plugins, we will first include the plugin manager, Vundle. This makes our task a bit easy. For analogy, we can say that it just works like
$ git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
sudo apt-get install exuberant-ctagsfor Linux users.
Mac Users can download it from this link.
This will be helpfull for tags generations. This is a pre-requisite for the Tagbar plugin that will use.
- Download this font. This will give the Plugin airline a classy look because it requires patched fonts. This font is one of them.
- For debian-linux, one might have to add support for unicode characters.
echo "set encoding=utf-8 nobomb" >> ~/.vimrc.
After downloading the pre-requisites, We can install all the plugins through the
From terminal you can run
vim +PluginInstall +qall.
Open Vim, then
After this, when you open Vim and press in normal mode
\b, it should look like this.
The following plugins have been used in my
~/.vimrc. You can go through the documentation of them to know there usage and the nitty-gritty.
This is a ever-evolving list and config for the VIM. The more you use, the more you get near mastering it.