Vim / Neovim plugins that I love, and maybe you will love, too
Neovim just like Vim, is an incredibly powerful coding editor, and one of its biggest advantages is how vast is its plugin ecosystem.
And now, with the ability to use Lua to write full plugins, the horizon is broadening even more.
Here is a list of 5 amazing plugins, not in any particular order, that you may not know yet.
Picture this, you start your Neovim instance in a project, you can use your fuzzy finder tool to easily jump between files, your Fugitive is aware of everything going on, you are flying.
Now, you have to jump to another project directory, and suddenly everything becomes a mess, your finder looks in the other folder, the files you changed are not showing up on Fugitive.
Vim-rooter can help with this situation, it automatically changes the working folder to as you switch buffers!
You can have 2 windows side by side and as you jump between then it will automatically go to the right directory.
This is the kind of plugin I wish I have written!
If you use TMUX in conjunction to Vim/Neovim you need this one.
It allows you to navigate seamlessly between Neovim and TMUX windows with a set of cohesive keybindings: Control + (h, j, k, l). Amazing.
Quoting the repo directly because the succinct and accurate description is perfect:
“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.”
Let's say want to change a big portion of your code that is encapsulated in double quotes to single quotes, it works even with multiple lines, you can do like this:
Let's break this down:
c – Change
s – The current surrounds for this sentence/object
" — From this, double quotes
' – To this, single quotes
It works with tags, normal text, whatever. It is so good, it should be part of Neovim already.
As the name might give it away, it is a file tree explorer for Neovim written in Lua.
It integrates with Git, diagnostics results from LSP and COC, live file filtering, shortcuts for file actions (create, cut, copy, paste, rename, and delete), and is highly customizable.
I recommend installing together with the web dev icons plugin, it will look so much better.
This one together with Fugitive will provide a powerful environment to manage Git repositories.
It is a fast way to provide Git decorators, super helpful to give insights of the changes you've made.
Among other things, it has easy status bar integration, signals changed lines on the gutter, ability to display deleted/changed lines via virtual lines, and my favorite, show Git blame of a specific line using virtual text!
I feel that I underutilize this plugin, it has so many cool things that would change for the better my workflow. Will definitely revisit this one very soon.
Another one that has such great description that I have to quote:
“Comment functions so powerful—no comment necessary.”
It might seem not that useful, even unnecessary for some, but hear me out, this thing is great!
It allows adding or removing comments from the current line, understand indentation, you can choose between block and line comments, it even works with Visually selected text!
I am so used to rely on NerdCommenter, especially when debugging something that requires me to toggle or comment lots of sections of a file. It saves so much time in these situations.
This could be easily a top 50 list, there are so many cool plugins out there, it wouldn't be a stretch to say that I discover a handful every week. But I tried to focus on the ones that I use and have incorporated on my workflow.
If you know some amazing, and obscure Vim/Neovim plugin, let me know!
Minimalist && life long learner