Vim Upgrade 2017

After using vim for few years the main difficulties I have with my current pathogen based vim plugin environment is, it's bit difficult to re-produce a fresh setup on new machine, managing gitmodules is dirty thing and adding new plugins and playing around with it is not straight. So I realized new plugins and plugin managers available now are well fit to address these problems. So here I'm logging the cosmetic and plugin changes done on my latest vim environment.

Setup Vim configurations


The commands shown in this gif are given bellow.

For all plugins go to site.


Now switched to new plugin manager vim-plug. This is very minimalistic and easy to use compared to pathogen. Also don't need to manage the plugins via git submodules. Reproducing the setup on a new system is much simpler now. With this plugin manager you can easily try out new plugins, lazy load the plugins when need it etc.

1. FZF

Fuzzy file search and buffer search, better than Command-t and there is no separate manual step needed to set it up when using with vim-plug. This plugin also relay on .gitignore file to filter out the unnecessary files from search.

Dependency: golang1.9.x+ installed in your box.

2. Silver searcher

If you not yet have it, then this one is must needed plugin for vim. This plugin depends on the command ag (silver searcher) on your machine, if it's not installed, install it from package manager.

Grep a keyword across the source directory, this is common feature in full fledged IDE's. Here we use the silver search with the ack.vim plugin to get the ag capabilities inside vim, also easy navigation on search results.

3. NerdTree

Standard plugin to list the project directories.

3. Code syntax check using lint tools.

  1. Syntastic: Pretty standard generic syntax issue identifier and reporter.

4. Language plugins

These plugins we can load when we open those language files only, vim-plug have option to do this when configure the plugin with it. See bellow section for the sample vim-plug configuration.

  1. vim.go : Make vim more friendly in vim, do re-format, highlight issues etc.
  2. rust.vim.git
  3. vim-ansible-yaml.git

How to setup this Environment.

git clone ~/Dotfiles
ln -s ~/Dotfiles/vim-files/vim ~/.vim
ln -s ~/Dotfiles/vim-files/vimrc ~/.vimrc

Now ready to install all plugins with single command :PlugInstall from vim.

Possible errors

  1. Sigfault when running :PlugInstall command

This is mainly comes when the ruby binding compiled with vim might have some issue, try this :ruby print "hello", this might reproduce the segfault issue. In this case get a fresh vim version or ensure vim got latest ruby bindings.

Go Top