TL;DR
Vim’s customization is endless. Use somebody else’s dotfiles to populate vim plugins.
Tip: Use the left or right arrow key to go to the next installation instruction.
Note: When I say vim, think of neovim. Read the differences here.
Doesn’t Matter; I’ll Read
We all have heard the “No Pain; No Gain” story which Vim users tell everybody who is not using Vim. The story can be summed up in just one or two pictures.
The Problem
I am an avid Vim user and I agree with these stories. However, these don’t tell that there lurks one of the craziest rabbit hole that one would encounter in their life — that is how to customize vim to fit my workflow.
The pursuit of finding / writing / testing / hacking a vim plugin so that it “might” improve my workflow has been a constant mirage I fall for. Vim’s plugin architecture and ecosystem is so good that it only makes it worse.
Once I realized that Vim is just a tool for me to navigate my work easily and probably finish my work early. I started looking at customization differently.
This does not mean that I do not use Vim with plugins, I use vim with many plugins. In fact 913 lines worth of vim plugin, I just copy-pasted somebody else’s dotfiles, vimrc, init.vim.
The Almost Solution
If you have been using Vim for some time, you see the incentives now and it’s about time you want to get the most out of the system. The rabbit hole is inevitable.
What might be helpful here is the fact that somebody has already gone through the pain and curated a config file which solves ~95% (subjectively) of your need. You use it as a black box today, explore the black box tomorrow.
I have created a step by step tutorial on how to use an existing dotfile to populate your neovim
Here are the top few workflow requirements where I spent most of my time and then settled with something simpler
- File Explorer — there are plenty of them starting from built-in Explore to full-fledged NerdTree, CocExplorer, Netrw, etc. I ended up using the CocExplore because it is easy to install and requires almost no config.
- Inbuilt floating terminal — It sure feels right to press <leader>+t and a floating terminal opens inside vim. Well, I spent weeks writing this only to realize there is a plugin already present. Now that’s it’s installed with my neovim I don’t use it much.
- Better navigation — Just let me tell you that don’t use any navigation outside vim’s vanilla navigation
- Language server and symbol explorer — This is something I really care about. Having an autocomplete which makes sense (not just a fuzzy suggestion) not only speeds up dev, it also eliminates bugs for languages like JS. So I really don’t mind spending time here. Although I ended up using coc.vim because it just works.
- Git integration — There are plenty of these. Just remember coloring your gutters might look tempting, but it’s often not so useful. The default git integration which comes with coc is good enough.
- Buffer management — Again I don’t know where to start here. Finally settled with a simple fzf based solution.
If you are lost in the vim-land, go through the guide. In the end, you would have a working vim(neovim) setup which I use on daily basis.