Emacs key bindings for Firefox and other stupid “power user” tricks

I’ve just installed Fedora 9 and I’m doing the usual re-configuration drill to get things to work the Right Way.

I use emacs. I want emacs key bindings in Firefox. Check out Firemacs from Kazu Yamamoto:

http://www.mew.org/~kazu/proj/firemacs/

I agree with the advice about disabling the up and down arrow keys for editing so you can use them to select auto-complete options. To do that, go to Tools->Add-ons->Firemacs, pick the “Edit” tab and delete the fields containing “up” and “down”. (Ctrl-N an Ctrl-P still work.)

Since I’ve been using a Mac for a few months, I reset the Firefox accel key to meta, so now meta-N opens a new window, meta-Q quits, etc. This gives you both Emacs key bindings AND Firefox shortcuts. To set this, type “about:config” in the URL window. Search for “accel” and set this line:

ui.key.accelKey;224

(224 is the key code for Meta, there is an on-going project to allow only slightly less understandable key words to be used instead.)

What used to work for emacs key bindings was to put the following in .gtkrc-2.0:

gtk-can-change-accels = 1
gtk-key-theme-name = “Emacs”
gtk-entry-select-on-focus = 0

I’m sure this has some effect on other apps. I’m not really sure if the first line is necessary or what the third line does, but I must have liked it at some point.

Finally, get rid of the irritating folders and icons on the desktop. Nautilus is responsible for this travesty. Disable with:

gconftool-2 -t bool /apps/nautilus/preferences/show_desktop -s false

4 thoughts on “Emacs key bindings for Firefox and other stupid “power user” tricks”

  1. The last one makes it so when you tab to a field, or press ctrl-l to go to the location bar, it doesn’t select all the text for you.

Comments are closed.