Stranice

Tuesday 8 May 2018

Vim plugins

There are many plugins out in the world for Vim and it takes time to investigate them and start to use them. I am slowly starting to become better and better Vim user. Some of the plugins are implemented in Vim add-ons for other code editors, or IDEs (integrated development environments).

If you are planning to use Vim plugins I highly recommend using some of Vim plugin manager. Vim 8 should contain a plugin manager, but I am using dein plugin manager. I used NeoBundle plugin manager before but it is deprecated. One of the major differences between NeoBundle and Dein that NeoBundle can be run on Windows. Since I am not using Windows anymore (although occasionally) I use Dein.

The list of Vim plugins I use:

  • vim-surround 
  • vim-airline
  • vim-airline-themes
  • vim-table-mode
A bit about those plugins.

Vim-surround (https://github.com/tpope/vim-surround)

Surround.vim is all about "surroundings": parentheses, brackets, quotes, XML tags, and more. The plugin provides mappings to easily delete, change and add such surroundings in pairs.

The documentation on its webpage sufficient and clear although I was confused a bit how to surround the selection of text. 

It is important to note that Eclipse plugin Vrapper support this plugin. 
I really love the plugin and use it very often.

Vim-airline (https://github.com/vim-airline/vim-airline)


It is just a nice status line that changes colour depending on the current Vim mode. If vim-fugitive is installed it shows which branch is active. Also, it displays various info about the file.

vim-airline-themes (https://github.com/vim-airline/vim-airline-themes)

Custom themes for the vim-airline plugin. 

vim-table-mode (https://github.com/dhruvasagar/vim-table-mode)

Quite useful if you want to make tables in the textual files. 
Excellent documentation on the github page.

Don't forget to use easy activation/deactivation for the plugin mode.
When in the normal mode type `<Leader>tm` and it will switch to the new mode.
This mode is more like a layer over the Insert mode.
<Leader> is a special key, `\` by default but it can be easily mapped to another value.