Browsing faster with Vimium

A small introduction to Vim

As a software engineer, typing fast is a hugely underrated, yet valuable and time-saving skill.

Whenever I work on code, I’m hindered not by my typing speed, but rather unnecessary movements away from the keyboard such as:

  • Moving my right hand to the mouse in order to scroll, switch to the terminal/filetree, switch buffers, and various other actions
  • Moving my fingers to the arrow keys to navigate within files

Though they seem like negligible movements, they add up to a lot of time when constantly repeated. In an ideal world, one’s fingers should be resting on the alphanumeric keys as long as humanly possible.

I was introduced to Vim (through ThePrimeagen) - a text editor on the command line with modal editing and unique keybindings, and was instantly hooked. One of the most iconic keybindings is using hjkl instead of the arrow keys. This way, we don’t ever have to move our hands away from the home row.

Though a little daunting at the beginning, it doesn’t take one too long to get used to it. A lot of their mappings make sense, and they offer keymaps for things you never knew you needed. You can type f<letter> to jump to the very first instance of that letter in the current line. That’s neat! But I’m digressing.

Vimium

As the name suggests, it’s an extension that brings Vim-style navigation to the browser!

I can’t count the amount of times I’ve searched something, moved my hands to the mouse, clicked on a link, typed some more stuff, and moved back to the mouse… you get the point.

With Vimium, instead of moving to the mouse to navigate through links, type f to bring up little yellow tags next to every clickable link on the page.

Want to click into the Wikipedia article “Hello World (film)”? Peep that the yellow tag on that link is H.

So my workflow has gone from:

  1. Type hello world<enter>
  2. Move hand to mouse
  3. Slide cursor down to the Wikipedia article link
  4. Click
  5. Move hand back to home row

To:

  1. Type hello world<enter>fh

Very cool.

Some useful mappings

I frequently rely on the mouse for scrolling. With Vimium, I just type u and d to skim up and down the page quickly.

There’s also using h and l to go back and forwards in history (with h and l representing left and right arrow keys in traditional Vim).

My favorite one: what about entering inputs? I click gi, which automatically clicks on the first text input box in the page. This is particularly useful for pages with a top search bar, like social media or e-commerce sites, or for focusing on the Google search bar to type a new search query.

Vimium is an open-source project with a ton of many other useful mappings, but the ones I’ve outlined above are the ones I use most often. I highly recommend trying it - it’s improved my productivity overall as a developer and general web surfer!