vi geeks (Emacs is ok too I guess….) this is tooooooooooo cool! For
those of us that actually remember how to do things before the
invention of the mouse this modification is for you in Firefox! The
following procedure will add keybindings that simulate vi navigation
movements such as the j and k keys.
- For versions following 1.0.5 the platformHTMLBindings.xml
file has moved inside the $firefox_home/chrome/toolkit.jar
(content/global/platformHTMLBindings.xml within the JAR file).
- You’ll need to extract the existing file from the archive,
modify it, then update the archive.
- The simplest way to modify the file is to move the jar file
into a working directory, unpack it, modify the file, the repack it
into the jar. Suggest that you also make a backup of the original toolkit.jar file while you are at it.
<font face="monospace">cd $MOZILLA_HOME/chrome/<br /> cp toolkit.jar $WORKING_DIRECTORY<br /> cd $WORKING_DIRECTORY</font>
<font face="monospace">jar -xf toolkit.jar</font>
Add the entries listed below as children of the <binding id=”browser”><handlers> element:
<font face="monospace"><handler event="keypress" key="k"command="cmd_scrollLineUp"/><br /> <handler event="keypress" key="j" command="cmd_scrollLineDown"/><br /> <handler event="keypress" key="l" command="cmd_scrollRight"/><br /> <handler event="keypress" key="h" command="cmd_scrollLeft"/></font>
<font face="monospace">cd $WORKING_DIRECTORY jar -cf toolkit.jar content/ </font>
NOTE: If you have turned on the Advanced Firefox
option “Begin finding when you being typing” this should
be turned off. By typing a /
character you can start a search for any text on the page and by typing
a ‘ character you can start a
search for any link on a page. For more info refer to the Firefox
Keyboard Shortcuts page.
I believe that this is the first page that has been updated to
accomplish this task for vi navigation on Firefox versions after 1.0.5 (HINT:
If you are using a version of Firefox before 1.0.6 YOU ARE NOT
PRACTICING SAFE BROWSING). The instructions provided here were
based on instructions for earlier versions of Firefox gathered from the