Returning to Firefox from Nyxt, while preserving the Emacs-style workflow and keybindings.


I love Emacs, but it’s definitely not a viable alternative to modern browsers like firefox. The desire to have an ’emacs-like’ browser lead me to use Nyxt.

Although nyxt is impressive, it has some rough edges and inherent issues. Furthermore, several websites that utilize cloudflare fail to function properly with nyxt, leading to an unending verification loop.

Presently, I have chosen to use Firefox with Emacs-like keybindings through the vimiun extension.

Here is a concise guide on replicating this setup.

Step I: about:config

First visit about:config.

To enable Emacs keybindings while editing text in Firefox, make the following changes:

  • Set ui.key.accelKey to 18
  • Set ui.key.chromeAccess to 0
  • Set devtools.editor.keymap to emacs

Step II: gtk-key-theme

Now, adjust .config/gtk-3.0/settings.ini, make sure you’ve added gtk-key-theme-name = Emacs It should look something like this:

gtk-key-theme-name = Emacs

Step III: Vimium

Install vimium.

Go on Vimium’s Options page to, by clicking the addon, and adjust Custom Key Mappings, here’s an example setup for Emacs.

unmapAll # use emacs-style bindings only
map <c-n> scrollDown
map <c-p> scrollUp
map <c-b> goBack
map <c-f> goForward
map <c-x>. scrollToTop
map <c-x>, scrollToBottom
map <c-V> scrollFullPageUp
map <c-v> scrollFullPageDown
map <c-x><c-r> reload
map <c-x>k removeTab
map <c-c><c-u> copyCurrentUrl
map <c-c><c-l> LinkHints.activateModeToCopyLinkUrl
map <c-c><c-o> openCopiedUrlInCurrentTab
map <c-c><c-O> openCopiedUrlInNewTab
map <c-c><c-i> enterInsertMode
map <c-x><c-f> LinkHints.activateMode
map <c-x><c-F> LinkHints.activateModeToOpenInNewForegroundTab
map <c-x><a-f> LinkHints.activateModeWithQueue
map <c-x>f LinkHints.activateModeToOpenInNewTab
map <c-x><c-d> Vomnibar.activate
map <c-x><c-D> Vomnibar.activateInNewTab
map <c-x>b Vomnibar.activateTabSelection
map <c-x><c-b> Vomnibar.activateBookmarks
map <c-x><c-B> Vomnibar.activateBookmarksInNewTab
map <c-@> Marks.activateCreateMode
map <c-x><c-@> Marks.activateGotoMode
map <c-s> enterFindMode
map <c-S> performFind
map <c-r> performBackwardsFind
map <c-R> performBackwardsFind
map <c-c>b previousTab
map <c-c>f nextTab
map <c-x>4 duplicateTab
map <c-g><c-r> restoreTab
map <c-x>5 moveTabToNewWindow
map <c-g><c-p> togglePinTab
map <a-B> moveTabLeft
map <a-F> moveTabRight
map <c-h> showHelp

You can find a complete vimium configuration that I’m using in my dotfiles repo