My experience using vim commands

Hassan Kanj
3 min readOct 20, 2020
Vim emulation for Visual Studio Code

Hello programmers,

In this post I would like to talk about my experience using vim commands, and will provide some tips that can help you as well.

please note that this is not an introduction to vim, so I recommend that you do some research about it first so you can benefit more from this post.

but in summary, vim is mainly a command line text editor that’s extremely powerful, though it has some steep learning curve and it may be a bit challenging to get used to it at first, but in my opinion it is totally worth it (as I explained in my post below).

also you may use vim commands inside VS code as well by installing an extension.

so I was a bit familiar with vim and I used an implementation of it as an extension in the past, and recently I am back to using it again (currently as a VS Code extension), but this time I am more serious about it, and this is my experience/comments so far:

  • vim commands usage can be frustrating at the beginning, you will feel extremely slow while coding, and you will feel tempted to use the mouse and the old keys combinations, the trick is to never do that, and what motivates me is the genuine belief that in the long run I will be much faster than using the mouse, you should do your research and be convinced or else you may not last long.
  • There’s almost always a better way to do something in vim, nevertheless don’t be obsessed with finding the best way for now, just use what you know, even if you navigated solely using “hjkl” as a start! be familiar with whatever navigation methods you are using and slowly explore different approaches.
  • In my case, after I become a bit familiar with the basic stuff, I started taking my time before every move, I may spend 10 or more seconds just thinking and contemplating the different possibilities on how to efficiently move the cursor from one location to another, again, no need for it to be the “perfect” move, but if you persist doing that, you will feel the difference in your speed, productivity, and energy. And your familiarity with the new moves/commands will open the door to even more improvements, since the previous commands are now very intuitive to you.
  • after you become more familiar with vim, start Googling if there’s a better way or a single key command for doing what you do (for example, I was using “hx” to remove the previous char, then I found about X to delete the previous char, etc…)
  • in conclusion, I feel I am getting much faster (though I still consider myself a beginner in vim), and genuinely feeling happier regarding the improvement, because now it feels I am spending less energy figuring things out and “magically” jumping in “creative” ways between code blocks, and actually the mouse and the old keys combinations are starting to feel slower and more “frustrating” in comparison! what an interesting turn of events!

--

--

Hassan Kanj

independent programmer (freelancer) / Maker / 3D printing enthusiast (https://www.HassanKanj.com)