A Brief Guide to vimb: the vim-like web browser
What is vimb?
“Vimb is a fast and lightweight vim like web browser based on the webkit web browser engine and the GTK toolkit.” - https://fanglingsu.github.io/vimb/
To understand vimb, you will first benefit from knowing of vim: a highly configurable text editor. It’s unique in that it is one of the oldest text editors still in active use today: in fact, vim just turned 25 years old this year!
vim makes for efficient text editing due to its focus on most operations being accessible from the home row of your keyboard. You can operate vim entirely without a mouse.
vimb takes these attractive properties and extends them to the web: a lightweight browser that can be operated using the keyboard alone, that is highly configurable. A lofty goal!
vimb plays best with Linux. Odds are, vimb can be found via your package manager.
If you are running Windows or macOS, then you’ll have to go down the less traveled road of building vimb from its source code.
When you run vimb for the first time, you’ll find yourself on the vimb website. Hit ‘f’ to bring up link hints, and type the letter beside the ‘man’ heading along the top. This will bring up the program manual. It’s a bit dense, but worth skimming to get an idea of what key bindings are available out of the box.
vimb lets you follow links by showing link hints when you press certain keys. The default is ‘f’ (for “follow”). It makes the screen look like this:
Here are some of the keys you’ll find yourself using the most:
kscroll your viewport up and down.
lfor horizontal motion. These will feel familiar if you’ve used vim. Try some other vim keys: you may find them to be identical here in vimb.
- Spacebar jumps down a half-page.
Shift+Spacebarjumps back up. Use
CTRL-bto do full-page jumps.
ggjumps to the top of the page;
Gjumps to the bottom.
ffollows a link in the current window. Use
Fto follow a link into a brand new window.
olets you type in a url to open in the current window.
Odoes the same, put pre-loads the current url into the text field. Use
Tto do the same for opening a new window.
CTRL+Inavigate Back and Forward, respectively. I found this awkward; see below in CONFIGURATION for tips on changing this to be more intuitive.
Esccloses most prompts and menus.
:qwill quit vimb.
vimb has great tab completion. Hit
o and type in a substring of the url of any
website you’ve visited, hit
TAB, and you’ll get a list to choose from. It even
matches website titles!
These should be enough pieces for everyday navigation, but do peruse the manual for even more.
On Linux, vimb looks in
~/.config/vimb/config for configuration information.
Here are some tidbits from my setup that you might find helpful for tailoring
vimb to your needs:
vimb lets you configure various search engines, which is more generally a facility for what it calls “shortcuts”.
For example, if I had a line like the following in my
I could then type
o d nodejs<ENTER> in vimb to perform a
DuckDuckGo search for “nodejs”. It’s easy to add
" Google shortcut-add g=https://encrypted.google.com/search?hl=en&q=$0 " NodeJS modules shortcut-add n=http://node-modules.com/search?q=$0 " Arch Linux wiki shortcut-add a=https://wiki.archlinux.org/index.php?title=Special%%3ASearch&search=$0&go=Go
Where are the tabs!?
vimb tries to embrace the UNIX Philosophy of single programs that do one thing well.
The developers decided that this means not including any tab management by
default. Each “tab” command, like
t http://blog.eight45.net will, you may have
noticed, open a brand new vimb window.
This takes some getting used to. The behaviour isn’t “bad” perse, just different than a pattern that the majority of web browsers employ. I’ve noticed that this frustrates some people.
You have a couple of options. The official approach is to use a separate program
to manage tabs. vimb supports the XEmbed
meaning you can use a separate program like
tabbed to manage tabs within a wrapping
parent window. Once
tabbed is installed, run vimb as
tabbed -c vimb -e. You
can find more information in the vimb
Another approach, which is the one I use, is to embrace the one-window-per-tab philosophy and make use of a tiling window manager to keep track of your windows. I often use i3’s “tabbed layout”, which lays out my vimb windows in in tabs not unlike traditional browsers, except with the added benefit that each tab is its own separate process that can be managed, killed, or suspended.
Web apps that require a high amounts of mouse interactions, such as map viewer
websites, will not work quite right out of the
box. Fortunately, pressing
CTRL+Z puts vimb into PASSTHROUGH mode, which
deactivates all of vimb’s vim key bindings and makes it operate much like a
traditional web browser.
You can hit Escape at any time to return to Normal mode.
Who is vimb for?
I’ve been using vimb as my default web browser for the last four months, with no intention of turning back. I’ve gotten by swimmingly: it’s a joy to use, and is configured in a way that would be difficult using a traditional browser like Chrome or Firefox.
vimb is for you if you like…
- …a more lightweight web browser, that eats up less memory and cpu cycles and loads pages faster.
- …idea of foregoing the mouse when browsing the web.
- …being able to configure just about any aspect of how your web browser works.
Who is vimb not for?
vimb might not be for you if you rely on…
- …cutting edge web features, like WebGL or WebRTC. Common for most web games, or video/voice calling apps.
- …the Flash or Silverlight plugins. Common for watching videos on Amazon or Netflix.
Since I do occassionally require some of the above from time to time, I’ve found it useful to keep Chrome or Firefox around for certain websites.
For YouTube and other video sites, I use youtube-dl to download videos locally and watch them with mplayer. (Though I hear you-get is an exciting up-and-coming youtube-dl contender!)
Try it out!
Give vimb a try! Even if vim isn’t your editor of choice, using a keyboard-driven web browser is a unique and interesting experience that ought to broaden your horizons about what exactly a web browser is.
How’d it go? Get stuck along the way? Let me know how it went.