Firefox speed increase + vi keybindings = happy user.

by Kyle Rankin

Related link:

There have been a lot of articles written recently about the Firefox web browser as it nears 1.0. I've used Mozilla or other Gecko-based browsers as my main browser for quite a long time, first with Mozilla and then a few years ago Galeon. I particularly loved Galeon's tabbed browsing features and configurability (something Mozilla didn't have at the time) and other nice features such as vi-style navigation (using h,j,k, and l to move left, down, up, and right respectively, just like in vi).

Without getting too much into what happened (it still sometimes makes me want to rant), Galeon underwent a rewrite and as a result lost many of the features that made me love it. While many of those features have started to return, in the mean time I found myself toggling between Galeon and Phoenix/Firebird/Firefox (or whatever name the project will end up having once three programmers in Malaysia or somewhere send a Cease and Desist letter stating that they named their Open Source minesweeper game "Firefox" two years ago).

Neither browser in its current incarnation completely satisfied me, although Firefox with the Tabbed Browser Extensions came the closest. I've been using that combination on all of my computers full-time except for my laptop. My laptop "only" has 256Mb of RAM and an 867Mhz Crusoe, and Firefox ran really slowly on such a setup.

This is interesting for two reasons. One, the fact that Firefox under Windows ran so much faster than Firefox under Linux, and two that Firefox, which aims to eliminate all the "bloat" from the complete Mozilla suite, actually ran slower than Mozilla on my machine (and Galeon ran slower than both).

I found myself toggling between Mozilla, Firefox, and Konqueror on my laptop, because Konqueror blew away all the Gecko-based browsers in speed, yet I still needed Mozilla and Firefox for certain sites. Another advantage to Konqueror was that it supported vi-style navigation. I'm a trained touch-typist, and I hate having to move my hands away from home row over to the arrow keys just to scroll down a page. This is doubly annoying on my laptop, because it has a trackpoint mouse, so I can even navigate with my mouse without leaving home row, but I still had to reach over for the arrow keys to scroll down a page.

Speed and vi-navigation were the two things keeping me away from Firefox full-time on my laptop, and both of those things have seemed to be remedied as of a few days ago. The speed issue has seemed to be fixed in the latest version of Firefox to hit Debian Sid (0.99+1.0RC1-3). I'm not exactly sure what changes they made, but there is a definite difference in opening new tabs and loading pages. It could still be faster but it's a marked improvement.

Also I've discovered how to enable vi-style navigation on Firefox. This page lists the very simple steps in the process, which are to create a userHTMLBindings.xml file in your res/builtin directory for your Mozilla install. In this file put:

<?xml version="1.0"?>
<!-- In order to work correctly, this file must be named -->
<!-- res/builtin/userHTMLBindings.xml in the mozilla tree. -->

<bindings id="htmlBindings"

<binding id="browserUser">

<handler event="keypress" key="k" command="cmd_scrollLineUp"/>
<handler event="keypress" key="j" command="cmd_scrollLineDown"/>
<handler event="keypress" key="l" command="cmd_scrollRight"/>
<handler event="keypress" key="h" command="cmd_scrollLeft"/>


Save the file and restart Firefox and hjkl work as advertised. I think Firefox is going to be the full-time browser on the laptop from here on out.

Have you noticed an increase in Firefox's speed under Linux lately?


2004-11-03 16:23:43
doesn't work with incremental search
Thanks for posting this. I really like the vi keybindings, so I was happy to try it out. However, I soon discovered an issue--the hjkl movement events were actually treated as incremental searches. I turned off that feature and everything worked fine--but I love incremental search. I'll give the keybindings a try, and we'll see which is more useful.


2004-11-03 16:26:02
doesn't work with incremental search
What I do is hit '/' to enable find-as-you-type. The article I link in this blog entry shows which keys need to be set in your prefs to enable this.
2004-11-04 08:06:03
doesn't work with incremental search
I'm sorry, I just tried that and it didn't work. Can you share how you enabled '/'?


2004-11-04 09:36:23
doesn't work with incremental search
The site I linked to mentions putting the following settings in your user.js. The most important one is setting accessibility.typeaheadfind.autostart to false:

// Find As You Type Configuration:
// Set this pref to false to disable Find As You Type:
user_pref("accessibility.typeaheadfind", true);
// If you set this pret to true, typing can automatically start Find As You Type.
// If false (default), you must hit / (find text) or ' (find links) before your search.
user_pref("accessibility.typeaheadfind.autostart", false);
// Set this pref to false if you want Find As You Type to search normal text too:
user_pref("accessibility.typeaheadfind.linksonly", false);
// Set this pref to true if you require that the link starts with the entered text:
user_pref("accessibility.typeaheadfind.startlinksonly", false);
// This is the time in milliseconds for the Find As You Type to stop watching for keystrokes:
user_pref("accessibility.typeaheadfind.timeout", 3000);

2004-11-08 10:45:55
Great, but can I kill the 'Find' bar
Love the settings, but...

The 'Find' bar pops up on the bottom of the page for me, even with accessibility.typeahead.find.autostart set to false. Any insight on how to keep that from happening (1.0 PR, linux)

2006-04-19 16:35:00
where is user.js located?