Home > Point2 - Technical > Vim commands in Firefox

Vim commands in Firefox

June 5, 2009

I have always been secretly frustrated switching between keyboard and mouse trying to navigate the web.  I say secretly because I have always accepted the awkwardness of having to use multiple input devices and never openly questioned the deficiencies of such a work flow:  use keyboard to perform search, switch to mouse to click on resulting links, switch to keyboard to enter form data, switch to mouse to follow new links… does this scenario sound familiar?  If you have ever tried to use only the keyboard to perform this work flow you would have quickly become agitated using the TAB key to jump through the maze of focal points on a web page.

About two weeks ago I was introduced to a Firefox add-on, Vimperator, from Vimperator labs.  “Vimperator is a free browser add-on for Firefox, which makes it look and behave like the Vim text editor. It has similar key bindings and you could call it a modal web browser, as key bindings differ according to which mode you are in.” – http://vimperator.org/trac/wiki/Vimperator

Being somewhat familiar with Vim from using Linux I was curious how a Vim command overlay would work for browsing the web.  I admit it was a bit intimidating at first when the Firefox toolbar and address bar disappeared, but after I started using the built-in help system, I quickly became amazed at how intelligent the integration was.  A favorite command so far is the way Vimperator handles links: use the ‘f’ key to tell Vimperator to enumerate the links visible on your screen, then use either the number to navigate to a link or start typing the text of the link and as soon as Vimperator identifies a unique link on a page you will be directed there, awesome.  Notice the yellow highlighted areas and the red/white numbered boxes in the screenshot below:

Vimperator QuickLinks

I was tempted to write this blog detailing the basics of how to use Vimperator but after a few google searches I realized there are many good blogs on this subject already.  One in particular stood out of the crowd and I would encourage you to take a look:  http://www.thegeekstuff.com/2009/05/firefox-add-on-vimperator-make-firefox-behave-like-vim/

The most important things I should mention before you start on this adventure are:

1) use the help system! (accessed by typing ‘:help’ without the quotes in the Vimperator command line).

2) use autocomplete to help you find new commands (accessed by typing ‘:set wildoptions=auto’ without the quotes in the Vimperator command line).

3) there are situations which don’t work well with Vimperator at this time so don’t throw out your mouse (e.g. flash, filling in a form containing a lot of checkboxes, pages with high use of IFrames).

4) I would love to have a button – obvious to non-Vimperator users – to disable Vimperator.  It is not obvious for the non-initiated to disable Vimperator unless they know it is a Firefox add-on or they know how to execute a Vimperator command ‘:addons’ (without the quotes).

5) Vimperator mixes well with other add-ons:
* Speed dial [http://addons.mozilla.org/en-US/firefox/addon/4810]
* It’s All Text! [http://addons.mozilla.org/en-US/firefox/addon/4125]
* Ubiquity [http://labs.mozilla.com/2008/08/introducing-ubiquity/]

Good luck, be patient as the learning curve is steep, and have fun!

Logan Peters, Marcos Tarruella

Advertisements
%d bloggers like this: