My Favorite Vim Commands in Chrome

vimium chrome miessler

I’m a huge Vim nerd, for hopefully obvious reasons, but one often finds themselves in need of a web browser. I use Chrome, and it has a plugin that I don’t think enough people know about called Vimium.

Vimium does exactly what you’re hoping for—it lets you use Vim commands in Chrome.

vimium help

A more complete set of available commands

There are lots of commands available, but these are my favorites:

j — to scroll slightly up
k — to scroll slightly down
d — scroll half a page down
u — to scroll up half a page
r — to reload the page
yy — to reload the page
/ — to search on the page (followed by n and N)
T — to search within tabs

Use cases

If you only have a fragment in the clipboard, P will search for that fragment instead.

External URLs — You get sent a URL from somewhere like Messages, Signal, or Email, and you copy it to your clipboard. Simply ⌘-TAB to get to Chrome and then press P. This will open that URL in a new tab for you. So it’s 1) open a tab, 2) paste, and 3) press enter—all in one keystroke.Searching Tabs — You can configure Chrome to search within tabs but that requires that you get to the URL bar, search, and find your result. Using T you can do it from anywhere and the results are quite good.Scrolling — Reading a page with j and k is very familiar since I spend a good amount of time in Vim.Finding Text — Similar to scrolling, using /, n, and N to find, find next instance, and find previous instance are far more warm and fuzzy than ⌘-f and clicking through results.Summary

Vimium is a sleeper of an extension. If you’re a Vim user it brings some familiarity to your other most-used application—the browser.

I hope this helps a fellow Vim user get more efficiency and comfort from Chrome.

 •  0 comments  •  flag
Share on Twitter
Published on February 10, 2022 04:06
No comments have been added yet.


Daniel Miessler's Blog

Daniel Miessler
Daniel Miessler isn't a Goodreads Author (yet), but they do have a blog, so here are some recent posts imported from their feed.
Follow Daniel Miessler's blog with rss.