The other day I was cleaning up my .vimrc file and thought about writing a post about plugins that I use and the reason.
I believe in simplicity, especially in my work environment. That's why I always try to customize as little as possible and try to use existing features. During past couple of years since I started using vim, I have found below plugins really useful.
This is the most important plugin that I use. It helps my install other plugins more easily and conveniently.
You just need to start your
.vimrc file with specific format and then for each plugin you want to have, add a line in this format:
The text inside single quote is the GitHub address of the repository of the plugin (except github.com).
But I think having so few plugins, I may be able to get rid of this one in future.
This is the plugin which helps me comment/uncomment a line of a block of text. You simply need to use `gc` and the currently selected block will be commented (or commented out if it's already commented). `gcc` does this for the current line.
You can combine this command with text movement verbs (e.g.
gc10j to comment current and next 10 lines).
The good thing about this plugin is that it detects the correct commenting syntax so it doesn't matter if you are working on a bash script or Python source code file. Just press the shortcut and this plugin will handle the rest.
I am always editing files and switching between buffers in vim. Unfortunately, standard features of vim are never enough for me (I wonder why they don't provide better options built-in). That's why I use this excellent plugin.
fzf command line utility as a back-end and lets you search for a buffer, file, MRU or text in current or all buffers. It is a pretty handy tool for me.
Plugins that I used before but not now
This is a great plugin which lets you use <TAB> key in insert mode to invoke autocomplete feature of vim. But I find current shortcuts enough for my job, especially considering the fact that, due to vim being a text editor, I cannot expect any sophisticated autocomplete which makes this feature less useful for me.
This was the plugin I was using before fzf. It's a very powerful plugin and lets you search for buffer, file, text and some other handy features.
The reason I switched to fzf was that it uses fzf command line utility which can be handy sometimes for me when I am working inside the terminal.
In a (failed) effort to replace CtrlP with a simpler alternative, I tried this one but gave up and returned to my favorite searcher plugin.
This is a useful plugin which helps search into most recently opened files and open them.
Another plugin which was supposed to replace fzf (CtrlP at that time) but did not succeed. It lets you search in current open buffers and switch to another buffer.
This plugin provides autocompletion for delimiters like single-quote, double-quote, braces, etc.
The reason I no longer use this plugin is that during my edits, there are lots of times that I need to insert a single delimiter, but this plugin comes into my way and forces insertion of an extra delimiter which I have to delete. Sometimes this can be frustrating, although some other times it can be handy.
This plugin highlights all operators (`()+-*/` and other similar operators) in your file. This can help you read a source code file more easily but my problem with this plugin was that it also highlights comment section of the code which makes reading comments annoying. Also having a lot of different colors in your text editor can sometimes be confusing.
This plugin checks the syntax of the current source code file and lets you know the error messages (if any). It highlights error lines and lets you easily navigate between errors. Personally, I prefer to use a terminal to check/compile my source code. And also having experience in working with dynamic typing languages, there is not much use for syntax checking as almost everything is evaluated at runtime (which I don't like but that's another story).