Vim is the last editor you will ever use

Started with Dreamweaver and went through a lot of editors in over 10 years of coding

Useless clutter

All editors come out of the box with a lot more than you might ever need. And just because it’s there, you end up using it. And maybe you shouldn’t. You might think that right-clicking to commit a change and having a popup where you enter your changes is increasing your productivity, it’s making you a faster and better coder; in reality you are missing out of the simplicity of the console and instead of understanding how something works, you only learn how your GUI works.

Visualisation is one the most important parts of understanding. You look at an app, you browse through the files, you start to understand how things are connected and you build your own mind map of the functionality. Removing everything you don’t absolutely need from an editor helps your imagination understand the code in your own perception rather than visualising menus and popups.

Now think about it, wouldn’t it be better to start with a simple base and build your own editor?

Change is hard. Editors for a programmer are like religion

I was a normal GUI editor user. I think I was coding in PhpStorm around 2014. I had no intention of switching to anything else. The editor suited me just fine. Like all other editors before it. Easy to do anything from refactoring to solving merge conflicts.

I was rather new at the respective job at that time. I was assigned to building a new team and transitioning an already built application into a new architecture and programming language. I discovered someone on the team maintaining the old app was a vim user. More specifically a port for OSX (think it was MacVim or something similar). I wasn’t on the best terms with this person (I was rewriting his code, so it felt like war from the day I started).

We got into the “editor battle”. Usual stuff, all developers go through this multiple times a year. He was lecturing me so hard and I was losing my patience. In my arrogance I decided to prove him wrong by switching to vim and gathering all I could in a couple of months of usage to use against his arguments.

And boy did I prove myself wrong.

First days with vim feels you are learning to walk again

It’s frustrating. You press the wrong keys, you try to use the mouse too much. You can’t see anything. There is nothing familiar. No menus. So simple. Too simple!

I usually persevere in both good and bad challenges. So I was adamant to continue. After a week of coding it started to sink in and feel better. I discovered vim plugins and of course I installed everything that would make my vim feel as familiar as possible. I was looking for the familiar clutter.

Project tree/browser

This is a hard one at first. I was used to think of the structure of a project by visualising the project tree in my GUI. Now I didn’t have it. So I was forced to adapt.

Working with vim means always having one console open with the code and one open for other commands. I was no stranger to linux so commands felt normal. Actually they felt better than using the popups. I was constantly switching dirs, listing, greping, git commands. It was only the information I needed presented to me as raw as possible. And that was exactly what I never knew I wanted.

*There are vim plugins that show you the project tree and let you interact with it. I just chose not to use one.

My plugins

You can build vim to be as you want it. With as much or as little additional functionality as you need. This is my vim:

  • ctrlp — Full path fuzzy file, buffer, mru, tag, … finder for Vim
  • html5 — HTML5 + inline SVG omnicomplete function, indent and syntax for Vim
  • syntastic — Syntastic is a syntax checking plugin for Vim created by Martin Grenfell
  • tmuxline — Simple tmux statusline generator with support for powerline symbols and vim/airline/lightline statusline integration
  • and a couple more (including all my config) here:

Freedom of the workstation

After playing around with vim and having all my projects cloned locally (as I was used to, partly because of my editor choices) I discovered a total freedom on the workstation.

All I need to start working on any new workstation is a console. I clone my vim repo and immediately feel comfortable. <1min to get my toolset. No installations.

Wrap up

I don’t think I will ever use any other editor other than vim. I recommend to anyone to give it a chance. Or at least pair program once with someone using vim. Everyone I’ve ever paired programmed has always been positively surprised of my setup.

And if you do switch and want to hone your vim key skills, I leave you with

Happy coding!

Like what you read? Give Corneliu Firan a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.