Productivity Chronicles: Use vim everywhere!
18 Feb 2016It feels like ages since my last post. I apologize for this. I have been pondering what to write about next, and I’ve decided to write another post on how I try to utilize small, useful perks that add up to increased productivity. One of these things is how I like to use vim
-like keybindings whenever available. (If vim
sounds completely Greek to you, have a quick glance here. This post is not an attempt to convince you to use vim
, but rather embracing some of its features and aspects that applies to other applications.)
vim navigation to the people!
If you’ve ever used vim
, you know that it may cause a great deal of confusion the first time you use it. The keybindings don’t exactly feel natural. This is a matter of practice and adaption to a different scheme than the one you may have previously encountered. Trying to use vim
for the first time may end up looking like this:
View post on imgur.com
However, the initially confusing keybindings of vim
are, in my opinion, its greatest strength and contribution! The point of using the h, j, k and l keys to navigate a file is to avoid moving your hands around the keyboard. Take a timeout and think about the following: Which combination of hand movements do I perform the most while using my computer?. For a great deal of you, the answer may be close to one of the following:
- Move the cursor. Click a menu item or link. Repeat.
- Type some text, type backspace n times and type some more.
- Type text. Move the cursor, using the mouse. Type some more elsewhere in the file.
These actions, which I have to tried to make as generic as possible, all have one thing in common. They all involve having both hands on the keyboard, lifting one of them to move the mouse, click something, and repeating. If you work a job requiring you to work a computer around eight hours a day, you’re prone to developing some kind of repetitive strain injury. Sounds scary, right? It does to me, which is why I like to use vim
-like keybindings whenever they are available (also I think it cools cool when I can navigate stuff without the mouse. Makes me feels somehwat like a Jedi, which should be the ulimate life goal for anyone. Search your feelings, and you’ll find it to be true). Specifically, I use them extensively while writing code, and while browsing the web. Those two activities constitute the majority of my keypresses and not having to using the mouse our touchpad the entire time, is indeed a huge weight of my shoulders.
Shut up and take my money!
But Jonas, what if I want to try this, too? Fear not, starting out with using vim
-keys in the browser is as easy as installing another browser extension (You know, stuff like AdBlock). If you’re a Chrome or Vivaldi user, there is vimium, which is the one I’ve been using lately. It allows for page navigation, and adds a Vomnibar, which is a pop-up HUD display that allows for some nifty navigation tricks, such as fuzzy searching of your browsing history or bookmarks. It also provides a very importan feature: The ability of identifying a link on the page and navigating to it, only by a few keypresses. No mouse movements needed!
I haven’t used them as much, but for Firefox users, there are similar tools, including VimFx and vimperator.
Give it a try!
To summarize this post: Try using vim
-keys for a few days, and I am confident that you will indeed enjoy the reduced number of mouse movements needed. What’s the worst thing that can happen? You go back to your old habits, which is by no means bad, but you won’t feel as badass!