Best Neovim Plugins For Software Development in 2019

The Vim text editor has been in existence for quite sometime now since its initial release in 1991 and has managed to remain the best bet for most seasoned software engineers in the industry. Despite its seemingly impossible learning curve, Vim is still being adopted by a substantial amount of developers even in 2019.

Due to the importance given to backwards compatibility and poorly maintained codebase, Vim is getting outdated in terms of speed and efficiency and to tackle this problem, Neovim was introduced in 2014. Neovim is the regular old vim with some very interesting and useful futuristic features incorporated.

In this article I shall introduce you to some very useful Neovim plugins for software development. These plugins help you make the most out of Neovim’s new features.

Setting up VimPlug Plugin Manager

VimPlug is a plugin manager for Neovim which supports installing multiple plugins in parallel. It is highly recommended that you use VimPlug as a plugin manager for neovim. To install VimPlug, run the following command on your terminal:

curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

1. Deoplete – Code Completion Engine

Deoplete (Dark Powered Neo Completion) is an asynchronous code completion framework the utilizes certain features in Neovim to make code completion more rapid. To install ‘Deoplete’ add the following line to your ‘init.vim’ configuration file between the ‘call plug#begin’ and ‘call plug#end’ lines:

Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }

Deoplete expects you to use the arrow keys to select from suggestion dropdowns while coding which isn’t ideal for most Vim users and hence it is recommended to map the ctrl-j and ctrl-k bindings to the up and down arrow keys. This can be achieved by adding the following lines to your ‘init.vim’ configuration file:

inoremap <expr> <C-j> pumvisible() ? "\<C-n>" : "\<C-j>"
inoremap <expr> <C-k> pumvisible() ? "\<C-p>" : "\<C-k>"

2. Nerdtree – Tree File Explorer

nerdtree plugin for neovim.

Opening and closing files in neovim can be difficult sometimes as you are expected to enter the entire path from the pwd to access a single file. Nerdtree offers a neat solution to this problem by adding a sidebar with a tree structure of the pwd from which you can easily open. create & delete files on the go. To install ‘Nerdtree’ add the following line to your ‘init.vim’ configuration file between the ‘call plug#begin’ and ‘call plug#end’ lines:

Plug 'scrooloose/nerdTree'

In order to easily access nerdtree, it is recommended that you setup the ctrl-n binding to toggle the nerdtree side-panel by adding the following line to your init.vim config file:

nmap <C-n> :NERDTreeToggle<CR>

3. Emmet – HTML Expansion

Coding HTML in Vim can be repetitive & exasperating. To make things easier, you can install the Emmet plugin that allows you to use css abbreviations to generate HTML code with the stroke of a key. To install ‘Emmet’ add the following line to your ‘init.vim’ configuration file between the ‘call plug#begin’ and ‘call plug#end’ lines:

Plug 'mattn/emmet-vim'

To learn more about the abbreviations available, Emmet has a published a documentation which is available at https://docs.emmet.io/. The default keystroke to activate the Emmet plugin is “<C-y>, ” which is a little difficult to type. To fix this problem, you may replace the <C-y> with a <C-a> mapping by adding the following to your ‘init.vim’ configuration file

let g:user_emmet_expandabbr_key = '<C-a>,'

4. Vim Surround – Quoting/Parenthesizing

Vim Surround is a tool that allows you to add matching parentheses, brackets, quotes, XML tags etc., around text without having to navigate back and forth. The plugin is fairly simple to use and the default key bindings for the plugin are easy as per Vim standards. To install ‘Vim Surround’ add the following line to your ‘init.vim’ configuration file between the ‘call plug#begin’ and ‘call plug#end’ lines:

Plug 'tpope/vim-surround'

Vim surround is a fairly popular plugin with 6,000+ stars on Github. Giving it a try is surely worth it.

5. CtrlP – Fuzzy File, Buffer and Tag Finder

Ctrlp is the most efficient and easy way to open buffers & files on Vim. With the stroke of <C-p> binding you can easily search through all the different files available in the PWD and the best part is that you don’t even have to be precise while typing the name of the file or buffer. The default binding seems sensible so you don’t have to remap the shortcut. You can install the “Ctrlp” plugin by adding the following lines to your ‘init.vim’ extension:

Plug 'ctrlpvim/ctrlp.vim'

6. Easy motion – Text Navigation

Easy motion makes the process of moving around the lines in a document or piece of code much simpler by adding shortcuts to access different parts of the visible lines. Easymotion has been in existence for quite a while now and has made it into my list of essential plugins. You will notice a significant improvement in your coding speed once you get acquainted to the Easy Motion Plugin. Add “Easy Motion” to Neovim by adding the following line to your ‘init.vim’ configuration file:

Plug 'easymotion/vim-easymotion'

To easily activate the plugin you can map it the “<Leader>s” key binding by adding the following line to your ‘init.vim’ file.

map <Leader> <Plug>(easymotion-prefix)

7. Airline – Info Tabline

Airline is more of a visual ornament to your Vim setup. It adds a bar at the bottom of Neovim Indicating the currently open file, current Git branch, text-encoding, current line number etc., It has a variety of themes out of the box so that you can customize the Airline to suit your taste. To add the “Airline” Plugin, add the following line to your ‘init.vim’ configuration file.

Plug 'bling/vim-airline'

These are the most utilitarian Neovim plugins that make coding experience in Neovim a joyous one. Which one do you like the most? Leave your answers below in the comments section.

Sreedev Kodichath

Sreedev Kodichath, a passionate software engineer, an avid blogger & an eloquent orator is the author of DevTechnica.

Leave a Reply

Your email address will not be published. Required fields are marked *