Related posts: Dark mode with Vimium

Vimium (Github, Chromium extension) is not only a great way to navigate webpages; it’s also a great help to quickly search many webpages.

I am using it many times a day to search for just the documentation I need. Some of the search engines I have configured:

# Documentation
archwiki: ArchWiki
aur: AUR
cpp: CppReference
github: GitHub
hoogle: Hoogle
oeis: OEIS
python: Python
wiki: Wikipedia

# Translation
nlen: Dutch -> English
ennl: English -> Dutch
deen: German -> English
ende: English -> German

# Other
imdb: IMDB
# `pe 123` to jump straight to problem 123.
pe: Project Euler
kattis: Kattis

Any of these can now be activated by typing their shorthand in the omnibar (which is usually activated by pressing o or O). Vimium even has live preview support for Wikipedia and Google search, as well as some others.

Note that you can select one of the live preview items using ctrl-j and ctrl-k, as well as the down and up arrow keys.

If, like me, you are searching for documentation many times a day, you will probably want to bind custom keys to the most frequently used search engines:

# searching is always in a new tab
map a Vomnibar.activateInNewTab keyword=archwiki
map U Vomnibar.activateInNewTab keyword=aur
map c Vomnibar.activateInNewTab keyword=cpp
map p Vomnibar.activateInNewTab keyword=python
map w Vomnibar.activateInNewTab keyword=wiki
# yes, multi-letter-commands work!
map gh Vomnibar.activateInNewTab keyword=github

On top of this, I have some more keybindings

# The usual to activate the omnibar.
map o Vomnibar.activate
map O Vomnibar.activateInNewTab
# Coming from Doom emacs, I really need this.
map <space> Vomnibar.activateInNewTab

# Tapping right shift produces $ here. Nice to quickly switch tabs.
map $ visitPreviousTab

# Capital F to open multiple links at once.
unmap F
map F LinkHints.activateModeWithQueue

# Search and switch to an open tab.
map t Vomnibar.activateTabSelection
map D moveTabToNewWindow
# Move to left/right tab.
map H previousTab
map L nextTab
# Move backward/forward in history.
map J goBack
map K goForward

map <c-]> passNextKey normal

# Un/pin a tab.
map gP togglePinTab

And lastly, I recommend enabling the Don't let pages steal the focus on load setting.