Vasu Adari

The Gravity of Vim: How I Escaped the Mouse

6 min read

I started using notepad++ for my college project to write java application. Don't particular remember features of it expect that it was better alternative in Windows around 2010. Although there was eclipse, i didn't like the auto suggestions it shows up when you type. I always found it complicated. notepad++ much lighter, i don't remember if it had syntax highlighting. Pretty got my project done with it.

Sublime Days

When i joined my first company, it was small team out of a research labs. I found that everyone uses some fancy editor. On my first day, i was given PC and asked to install ubuntu freshly. From my high school days, i had an habit of switching between OSes pretty often. I'm supposed to learn Ruby & Ruby On Rails in my first week.

I installed sublime to start my project, it was quite intuitive. Ruby and sublime used to jell so well it made navigation across the code bases so easier. Thing you should know about ruby is that sometimes it might take hours just to understand how a line of code actually works as its full of riddles. Every developer who worked on ruby would feel like a sherlock holmes ;).

The editor with quick navigations, speed at which you could install extensions, writing snippets for rudimentary tasks. There were tons of extensions you could quickly play around with. And the keyboard shortcuts, learned all the possible shortcuts of sublime which can speed up my development. Those days if there was no sublime not sure how difficult it would have been to debug any ruby code. By default it recognizes most of the languages. These days we have LSPs and treesitter, discussion for a different day. I remember how we used to discuss about optimizing usage of sublime to increase our productivity during chai breaks.

Early Days of Vi

Locally, using your favourite editor to keep your productivity optimal is great. But when it comes to debugging linux based servers, you're limited to vi(mostly). Thing about vi, ask anybody who used it for first time to edit some haproxy or nginx or tomcat configuration files on servers, the guy will go nuts just figuring out how to edit a line of file, and would consider yourself lucky if you pressed the key i by mistake.

In a way, those frustrating experiences are what make people curious about vi in the first place. Even now, I know devs who struggle just to edit a file, watching them doing it is like a Tom trying to kill Jerry so many times but never succeeds. Point i was trying to make was that it was like a goto tool in your server to modify any file. Unless, you decide to build a fancy extension for sublime which could connect to your remote server to update the files, putting your servers at risk.

Over a period one would only get curious about vi. When you learn vi you will be amazed how the creator brain is wired up. I think due to that curiosity i figured a way to configure vim mode in sublime. Learned handful of shortcuts to navigate around. I used to press j & k to move up and down, it takes ages. One day i noticed key movements were freekishly fast in one of the senior engineer's machine. I got so curious and learned that in your Mac you can increase you key repeat speed. Trust me its a saviour. Also picked up touching type on my way because doesn't make sense if you're slow :)

Anyway, before switching to vim there were notable editors like Atom & VSCode got released. Comparatively, for backend developer at least sublime was still a better choice. It only became clear that number of engineers grew in size and there goes demand for editors. Its like huge segments of engineers got created, whereas emacs and vim users looked like a cult people. No one would go dare near them.

Who knows what hit the Microsoft, those were days one would be puzzled about Microsoft Visual Studio, i always used to have fun just creating a dialog box just to see the output but never really created anything useful. Fast foward to now, their Visual Studio Code editor has some many users for which i'm always amazed. If you think about it until a point only Google and Meta had some for dev communities like Chrome Browser (which i hate) and React Framework. Microsoft entered the game with VSCode, TypeScript Github and some many other tools for developers. Big one is powershell behaving like linux terminal after so long but never late.

Vim Days

My journey with vim has begun sometime in 2019. The editor itself has a good tutorial when you open, it is a good starting point for anyone who wants to learn it. Just as gamers have the keys wasd, hjkl are for vim users. One should wonder why they had to pick keys in single line, but if you observe carefully i would says its most ergomnic for your fingers not sure if creator particular though that before choosing.

Thing about vim is that you can learn one new thing about it daily, your lifetime won't be enough. Maybe if AI tomorrow decides to use editor internally for thinking it would maximum utilize all the functionalities. But i wonder whether it would pick emacs or vim though. Unlike other editors like sublime or VSCode where once you install enough extensions you survive with them for years. With vim you will endup questioning nature of the editor and its state of the art plugin ecosystem.

It has vast ocean of plugins, you'll just get immersed into it just to feel maybe you're part of it. Speed at which you can move around the files with vim is incredible. Once you get so used to vim, you'll feel mouse is too slow. And you'll end up finding vim extension almost for everything. Maybe i think vim creator was so much in love with unix terminal that he wants to give a justice to it.

Another problem with vim is its setup, you'll go mad just figuring out how to setup shortcuts and plugins. Its like how a human grows from a child to adulthood, it also has its phase. You'll eventually figure out a best way to manage it which only comes from experience and thats natural.

Anyway my journey with vim has gone through its phases, and after a point i have managed to version control the setup with github repository. Now and then i'll find an interesting plugin or something new about it. Currently, i have decided to write useful plugins. Eventually, everyone will find their soulmate :D. Thanks for reading my first blog. Cheers 🍻