Vim Motions Cheat Sheet

Vim Motions Cheat Sheet

Vimium - The Hacker's Browser

Vimium is a browser extension that provides keyboard-based navigation and control of the web in the spirit of the Vim editor.

Installation instructions:

Install via the Chrome web store or the Firefox Addons site.

To install from source, see here.

Vimium's Options page can be reached via a link on the help dialog (type ?) or via the button next to Vimium on the extension pages of Chrome (chrome://extensions) or Firefox (about:addons).

Keyboard Bindings

Modifier keys are specified as <c-x>, <m-x>, and <a-x> for ctrl+x, meta+x, and alt+x respectively. For shift+x and ctrl-shift-x, just type X and <c-X>. See the next section for how to customize these bindings.

Once you have Vimium installed, you can see this list of key bindings at any time by typing ?.

Navigating the current page:

KeyAction
?Show the help dialog for a list of keys
hScroll left
jScroll down
kScroll up
lScroll right
ggScroll to top of the page
GScroll to bottom of the page
dScroll down half a page
uScroll up half a page
fOpen a link in the current tab
FOpen a link in a new tab
rReload
gsView source
iEnter insert mode
yyCopy the current URL to the clipboard
yfCopy a link URL to the clipboard
gfCycle forward to the next frame
gFFocus the main/top frame

Navigating to new pages:

KeyAction
oOpen URL, bookmark, or history entry
OOpen URL, bookmark, history entry in a new tab
bOpen bookmark
BOpen bookmark in a new tab

Using find:

KeyAction
/Enter find mode -- type your search query and hit Enter to search, or Esc to cancel
nCycle forward to the next find match
NCycle backward to the previous find match

For advanced usage, see regular expressions on the wiki.

Navigating your history:

KeyAction
HGo back in history
LGo forward in history

Manipulating tabs:

KeyAction
J, gTGo one tab left
K, gtGo one tab right
g0Go to the first tab. Use ng0 to go to n-th tab
g$Go to the last tab
^Visit the previously-visited tab
tCreate tab
ytDuplicate current tab
xClose current tab
XRestore closed tab (i.e., unwind the 'x' command)
TSearch through your open tabs
WMove current tab to new window
<a-p>Pin/unpin current tab

Using marks:

KeyAction
ma, mASet local mark "a" (global mark "A")
a, AJump to local mark "a" (global mark "A")
``Jump back to the position before the previous jump (before the previous gg, G, n, N, /, or `a)

Additional advanced browsing commands:

KeyAction
]], [[Follow the link labeled next or > (previous or <) - useful for browsing paginated sites
<a-f>Open multiple links in a new tab
giFocus the first (or n-th) text input box on the page. Use "tab" to cycle through options.
guGo up one level in the URL hierarchy
gUGo up to root of the URL hierarchy
geEdit the current URL
gEEdit the current URL and open in a new tab
zHScroll all the way left
zLScroll all the way right
vEnter visual mode; use p/P to paste-and-go, use y to yank
VEnter visual line mode

Vimium supports command repetition so, for example, hitting 5t will open 5 tabs in rapid succession.

There are some advanced commands which aren't documented here; refer to the help dialog (type ?) for a full list.

Custom Key Mappings

You may remap or unmap any of the default key bindings in the "Custom key mappings" on the options page.