Vim Plugins that Cure Depression ๐Ÿ”Œ

I didn't think life (in a terminal editor) could get so good.

There's nothing more fulfilling than seamless text editing, but some features are beyond vanilla Vim. I've collated some extensions that range from nifty to aphrodisiacal.

I use Neovim but need a backward compatible config, so all of these work well in Vim.

  1. COC - autocomplete, jump to definition and refactor
  2. FZF - fuzzy project file search
  3. Commentary - block commenting
  4. Surround - changing and inserting bracket/quote mark/tag pairs
  5. Highlighted Yank
  6. REST Console - perform HTTP requests
  7. Vimium - vim bindings in a browser

COC

Newer plugins work better and are less bloated, but I love Coc. It's simple to set up and comes with everything out of the box. Decent autocomplete, fast jumping to function definitions and references and clean refactoring.

coc demo

Ensure you add the languages you use to vimrc.

let g:coc_global_extensions = [
	\ 'coc-snippets',
	\ 'coc-pyright',
	\ 'coc-clangd',
	\ 'coc-sh',
	\ 'coc-vimtex',
	\ 'coc-docker',
	\ 'coc-json',
	\ 'coc-yaml',
	\ 'coc-html',
	\ 'coc-css',
	\ 'coc-tsserver',
	\ 'coc-flutter',
\]
GitHub - neoclide/coc.nvim: Nodejs extension host for vim & neovim, load extensions like VSCode and host language servers.
Nodejs extension host for vim & neovim, load extensions like VSCode and host language servers. - GitHub - neoclide/coc.nvim: Nodejs extension host for vim & neovim, load extensions like VSC...

FZF

Essential for larger projects where you can't remember exact functions, variables or file names. FZF is a general-purpose fuzzy finder ported to Vim as a robust project file search.

Knowing what's going on in a command line editor is more of a challenge than using one. This plugin takes orienting yourself and jumping around to a new level.

fzf demo
GitHub - junegunn/fzf.vim: fzf vim
fzf :heart: vim. Contribute to junegunn/fzf.vim development by creating an account on GitHub.

Commentary

Not the most glamorous plugin, but its absence is excruciating. It is a crime that Vim doesn't come with block commenting, so this avoids having to visual block insert comment characters - then visual block remove them when you've fixed your mess.

commentary demo
GitHub - junegunn/fzf.vim: fzf vim
fzf :heart: vim. Contribute to junegunn/fzf.vim development by creating an account on GitHub.

Surround

Simultaneous bounding character operations. Insert, change and remove pairs of brackets, quote marks, HTML tags, or anything really.

surround demo
GitHub - tpope/vim-surround: surround.vim: Delete/change/add parentheses/quotes/XML-tags/much more with ease
surround.vim: Delete/change/add parentheses/quotes/XML-tags/much more with ease - GitHub - tpope/vim-surround: surround.vim: Delete/change/add parentheses/quotes/XML-tags/much more with ease

Highlighted Yank

A quality of life plugin that solves the awkward 'wait, what did I just yank' pause.

yank demo
GitHub - machakann/vim-highlightedyank: Make the yanked region apparent!
Make the yanked region apparent! Contribute to machakann/vim-highlightedyank development by creating an account on GitHub.

REST Console

A great alternative to Postman. List out API requests between three hashes as below, and C-j to send manual HTTP requests.

It's not as good as scripting (you'll need to copy-paste keys and whatnot each request), but a helpful prototyping tool nonetheless.

rest demo
GitHub - diepm/vim-rest-console: A REST console for Vim.
A REST console for Vim. Contribute to diepm/vim-rest-console development by creating an account on GitHub.

Vimium

Not a plugin per se. It's a free browser extension that enables vim key bindings.

Press f to identify interactive DOM elements and then corresponding location letters. It makes for smooth switching between editor and browser interaction and a substantial engineer ego boost using the mouse less.

vimium demo

Some version is available from your browser's extension store.

Vimium
The Hackerโ€™s Browser. Vimium provides keyboard shortcuts for navigation and control in the spirit of Vim.
Vimium-FF โ€“ Get this Extension for ๐ŸฆŠ Firefox (en-US)
Download Vimium-FF for Firefox. The Hackerโ€™s Browser. Vimium provides keyboard shortcuts for navigation and control in the spirit of Vim. This is a port of the popular Chrome extension to Firefox. Most stuff works, but the port to Firefox remains a work in progress.

I'd share my full config, but I accidentally git-pushed a password at some point. Repo is private at the mo ๐Ÿ˜—