Quentin Delcourt

Vim Survival Toolkit

17 commands to help you fix a file to restore the production, where the only available editor is Vim
TL;DR Skip to the commands.

I used to hate Vim.

Back when I was in CS school, teachers took great pleasure in forcing us to use this dinosaur tool that you can only despise after 5 minutes of use. But nowadays I can thank my teachers for getting all this knowledge into my head.

Indeed, you don't always have the opportunity to have an Atom, a VSCode or a PHPStorm to edit a file. Sometimes, you have to log in with SSH on a production server to remove a "," from a configuration file that is currently rendering the said server unusable. And then the ony editor at your disposal might be Vim.

There are people who use Vim as an IDE, but I'm not among them. Instead, I have a basic knowledge of it that allows me to do only the very necessary and most simple stuff. Editing, moving around, saving, and most importantly when it comes to Vim: quitting.

The commands below are, in my humble opinion, the only essential commands you need to know in order to survive with Vim.

Editing

Exiting

Searching

Undoing

Moving

Playing with lines

These commands have allowed multiple production servers to be saved over the last 15 years 😁


Originally posted as a thread on Twitter.