Browser

Pentadactyl: Firefox for Vim junkies

Would a life without Vim or vi be less efficient and productive for you, and probably much more frustrating? Maybe you should consider using the Pentadactyl extension for Firefox.

Heavy users of console-based applications and command line utilities often choose several of the same programs for regular use. The three most common toolsets are probably the following:

  • Mutt for email.
  • Shell commands and core utilities for filesystem management.
  • Vim or vi for text editing and software development.

After a while, heavy Vim or vi usage generally leads to such a level of familiarity and efficiency that it makes sense for the user to start choosing other applications specifically for their conformance to the expectations of vi muscle memory. For a long time, modern Web browsers constituted a category of software that resisted offering meaningful choices suited to the vi way of doing things.

The powerful Firefox extension system eventually gave rise to a solution to this problem. The first really popular vi-like keybindings extension for Firefox was called Vimperator, and it became addictive for those who took the time to get used to it. When Chromium appeared on the scene, it offered stiff competition for Firefox in terms of basic features, usability, stability, and performance, but without an extension system it did not offer enough to draw the heaviest Vimperator users away from Firefox.

Chromium finally got its extension system, and a few attempts to provide a Vimperator-style interface were made; Vimium was the most successful. It rapidly started gaining parity with basic features of Vimperator, but it was limited by the restrictions the Chromium developers placed on the browser's extension system. This resulted in a vi-like keybindings extension that is fundamentally broken for many purposes. Other WebKit browsers started appearing that use vi-like keybindings by default, including the highly customizable and extensible Uzbl, whose stability is still less than perfect and ease of extension is not entirely newbie-friendly; and surf, whose configurability is nearly nonexistent (you apparently have to edit header files and recompile to "configure" it -- more like forking than configuring) and whose vi-like keybinding support is clunky and incomplete, to say nothing of its lack of extensibility and common, basic features of other modern browsers.

Vimperator itself saw some problems. Its maintainer had contributed little or nothing to the ongoing development of the extension for quite some time, relatively speaking, while a couple of other developers were doing almost all of the development. These other developers wanted to make some changes to the architecture and direction of the project, but the largely inactive primary maintainer did not agree with their take on where the project should go. This led to a split, not as rancorous as some project forks may be at times, but mostly a simple parting of ways. Thus, Pentadactyl was born.

In part because such a substantial percentage of recent code came from the developers who left the Vimperator project, and in part because they wanted to restructure the architecture of the system anyway, it made sense for them to grab their own contributed code and leave behind any code they did not create themselves alone. This provided the opportunity to develop what they obviously considered a better vi-like keybindings extension. As a result of some high-volume, intensive development, Pentadactyl is now a more complete, more actively supported vi-like keybinding extension, available under the copyfree MIT/X11 License (the same license as used by surf).

Vimperator was previously distributed under the copyleft GPL (the same license as Uzbl) plus the LGPL and MPL; it has ditched tri-license distribution in favor of the MIT/X11 License, not long before the Pentadactyl fork. After the split, Vimperator so far still has more established name recognition, but development momentum and comprehensive functionality seem to be solidly on the side of Pentadactyl for future popularity.

As a former Vimperator user who has spent substantial time in surf, Uzbl, and Vimium, as well as more cursory time trying out other browsers and Chromium extensions that offer similar interface options, I am much happier with Pentadactyl than any of the alternatives. Its command functionality, in-application help documentation, completeness, configurability, stability, and (for those using the nightly builds, at least) currency are all superior to the other possibilities for vi-like keybindings in a browser. The slightly acerbic, it must be admitted, helpfulness of the developers and heavy users in the #pentadactyl channel on irc.oftc.net (IRC network) only adds to the reasons for heavy Vim and vi users to install and enjoy Pentadactyl.

Considering the annoyances imposed on my life over the last three major versions of the Firefox browser, starting with the memory leak that is not actually a memory leak (see "memory fragmentation"), the usefulness of Pentadactyl for a heavy user of vi-like editors like me is the biggest reason I still use that browser. If not for the power of the extension system that supports extensions like Pentadactyl and HTTPS Everywhere, I would have dropped Firefox a long time ago. Just as I would find the cumbersome life of a Notepad and MS Word user -- or Gedit and OpenOffice.org Write user -- very frustrating after gaining expertise in the efficient use of powerful vi-like editors, I find the use of Chromium and even surf very frustrating at times as well, because of the lack of comprehensive and stable support for vi-like keybindings in Pentadactyl.

I give Pentadactyl two thumbs up. I only have two thumbs, after all.

About

Chad Perrin is an IT consultant, developer, and freelance professional writer. He holds both Microsoft and CompTIA certifications and is a graduate of two IT industry trade schools.

10 comments
pgit
pgit

It's gotten worse, not better. The machines I allowed ff 4 to infect have suffered crashes and lockups that the same systems did not suffer with ff 3.x. This instance I am using, 3.6.16, has been a nightmare in it's own right. Lately, and without apparent cause (no updates or any additions) now locks up so hard on occasion that ctrl+alt+backspace is the only function available to the user, aside from being able to drive an impotent mouse cursor around a non responsive screen. There is one file on wikipedia that I can go to right this instant, and I'd be going bye bye. Like clockwork. (a map of the Lehigh Valley Railroad ca 1900) I can open the same file in chromium, konqueror, opera... basically any browser except ff. I use the heck out of extensions, the ONLY reason I am still using ff. But more frequently I find myself copying a link, opening chromium and pasting, just so I can use the dang resource. I'm beginning to wonder why I tolerate an app that I know will get in my way, spectacularly so in many instances. The next article I seen in my cue is Vincent Danen's take on this very issue...

Sterling chip Camden
Sterling chip Camden

I use Pentadactyl all the time. Like you, I'm kept on Firefox for that, Greasemonkey (for tr-rectify) and HTTPS Everywhere. Three indispensable extensions. Firebug is great, too, but Chrome has just as good facilities for debugging, I think. The big problems with Firefox, though, are crashes and speed. I get core dumps just about every day on FF4, and starting the browser takes forever. Surf is a welcome change to that, plus I prefer WebKit rendering over Gecko. Maybe someday I'll find the time to hack an extension system into a Surf clone. That would be truly awesome.

apotheon
apotheon

I agree -- Firefox has been going downhill since it changed its name from Firebird, at least (if not sooner). I remember those halcyon days with some nostalgia and sadness. > I'm beginning to wonder why I tolerate an app that I know will get in my way, spectacularly so in many instances. Extensions. That's why. At least . . . that's why I do. I'm rapidly approaching my breaking point, though.

apotheon
apotheon

I don't see core dumps from Firefox 4, for the most part -- but this morning I opened up my laptop and discovered I was running 97% RAM usage and 11% swap. I switched to the workspace with Firefox running (knowing that would be the problem) and it was just a big gray rectangle. I killed Firefox from a terminal, and RAM usage dropped to 23% immediately, swap to 3%. I restarted Firefox, and so far it's up to 24%. It does that sometimes. Once, I opened up my laptop in the morning (after everything seemed fine the night before) to find RAM at 99%, swap at 99%, and the computer completely unresponsive. I need to remember to shut down Firefox more often, I guess. I've been thinking about hacking some configuration options, and possibly an extensions system, into surf as well. In fact, I've looked at the code, and at a glance it seems relatively simple. It might be the perfect project to practice my pathetically weak C skills when I get around to it.

apotheon
apotheon

Containment breach! Sound the alarm! Full hazmat gear! Duck and cover! Stop drop and roll! Put your head between your legs and kiss yourself goodbye!

apotheon
apotheon

It never occurred to me that the Mozilla Foundation might be trying to find the Higgs Boson.

pgit
pgit

as if firefox is being developed in the particle accelerator at CERN... God help us if they lose containment.

apotheon
apotheon

Relative to 3.6, 4.0 is terrible. Relative to 3.5, 3.6 was pretty bad. Relative to 3.0, 3.5 was kinda sucky. . . . and so on.