Configure Vim
2017-09-01

Configure Vim

The above picture is from my favorite serial Mr.Robot. Elliot Alderson is writing a script to hack Evil Corp.

I have three development environments

  • One Cent-OS machine for C programming in office
  • Ubuntu-16.04 Digitalocean and AWS virtual machines to host some servers and Ethereum developemnt
  • And one Raspberry PI 3 at home as an SSH client

As the Cent-OS machine has older version of vim, Plugins that require latest version of vim and plugins that are only needed for Web/Ethereum development are kept under an if condition. So modify it based on your need.

Here I didn’t give any explanation for any config or plugin. Copy pasting them in Google will give you the information.

Backup you vimrc file

1
$ mv ~/.vimrc ~/.vimrc.orig

Clone Vundle into your ~/.vim directory

1
$ git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

Copy this vimrc file into your home directory.

Install plugins using PluginInstall command. Open vim with no file. Ignore if any error shows up. Press Esc key then : and type the command PluginInstall followed by Enter key. A new window will open and install all plugins.

1
2
3
$ vim

:PluginInstall

Don’t forget to install ‘YouCompleteMe’ in your machine.

1
2
$ cd ~/.vim/bundle/YouCompleteMe/
$ ./install.py --js-completer --clang-completer --system-libclang

Installing auto-complete feature for JavaScript and C Language. See YouCompleteMe GitHub page for more details.