Vim Plugins
We already have a workable environment with vim, but let’s make it feel like home. Vim is popular because it is customizable through plug-ins. There are some options to install plug-ins in vim but let’s stick with one for this tutorial: vim-plug
. To install please enter the following code in the terminal:
Add a vim-plug section to your ~/.vimrc
through the command:
Now write the following, begin the section with ‘call plug#begin()’ and list the plugins with ‘Plug’ commands.
Here, we are installing the dracula theme for testing our plugin system. Save the file and reload vim. Then use this command to install the plugin.
After restarting vim it should look like this:
Under the call plug#end()
line we can configure our vim editor with the set
method.
This configuration will add a ruler of number for the code, add an always visible status line, highlight the current cursor line, and set the tab and indentation variables.
Other Plugins
There are plenty of plugins to add to your vim, here I suggest some of them.
Note: tagbar has a dependency that need to be installled through apt-get: exuberant-ctags
. To install this dependency:
Now, this is the complete .vimrc
config file:
Let’s see how it looks like in a project. Return to the project previously created and type vim .
That’s it, in the next post we will be adding OmniSharper to the mix.