Last edit
Sammanfattning: jsSlime
Tillagd:
> == Developing with Firefox ==
> [https://github.com/segv/jss jsSlime] provides an interface for Firefox' JavaScript debugger.
Create a new bookmark using the Bookmark Manager. Use these attributes:
Then left-click on the new bookmark and edit its properties. Add the following attribute:
Now type “emacs <term>” in the adressbar to search the wiki for a term.
jsSlime provides an interface for Firefox’ JavaScript debugger.
You can also use It's All Text for this. In the preferences for the extension, point it toward either emacs or emacsclient. Note that you might have to then restart the browser in order for the editor to be recognized. This extension gives you a cute little button that hovers near the text area to click in order to start the editing. It also has hotkey support, and you can specify what extension is used for the temporary file – which is handy for having it trigger the correct emacs mode. It’s All Text does not block Firefox while editing, and you don’t have to close the editor to update the text area.
To use Native Windows Emacs from Firefox to edit HTML input text areas (like Wikipedia and other Wiki pages), see a small Github Cygwin project by JariAalto. It contains source code to build a utility that can be used in It's All Text add-on to call running Emacs, provided that you start Emacs with M-x
server-start.
The mozex extension will call GnuClient or EmacsClient for you:
Install it, restart your browser, choose → Tools → Extensions, and double-click on the mozex extension. This opens the preferences dialog. Use “/tmp” as the temporary directory, and use one of the following as the command for textareas:
/usr/bin/gnuclient %t /usr/local/bin/gnuclient %t /usr/bin/emacsclient %t /usr/local/bin/emacsclient %t
Now start to edit a wiki page, hit mouse-3 and choose → mozex → Edit Textarea.
Unfortunately this seems to corrupt some non-ascii characters (but not all). Oh well.
If you are using SimpleWikiMode, make sure you add something like this to your ~/.emacs file:
(add-to-list 'auto-mode-alist '("mozex.textarea" . simple-wiki-mode))For a more recent package, look at ViewSourceWith which is still maintained.
Firemacs (firefox add-on) provides some Emacs-like key bindings for Firefox.
KeySnail is the yet another firefox add-on for Emacs junkies which is similar to Vimperator.
9ne (pronounced “nine”) is an online code editor based on Emacs (Copyright 2006 Rob Rohan). 9ne is a recursive acronym and joke, and means “9ne is not Emacs”.
THEY decided that Emacs compatible keybindings are not What The User Wants, and removed them in Firefox 1.0. Luckily, THEY use Gtk, and Gtk thinks of us. (This was found on Bugzilla)
Add the following lines to your ~/.gtkrc-2.0:
# Get firefox to use emacs keybindings include "/usr/share/themes/Emacs/gtk-2.0-key/gtkrc" gtk-key-theme-name = "Emacs"
Be sure that that path exists, it may vary between distributions. After that, you should feel at home in most parts of Firefox.
Please feel free to save this as a file somewhere and replace the actual code here with a link. I would have done so myself but I’m not sure where to put it - the Elisp area seems only for elisp.
Stuff for Emacs Wiki users with Mozilla browsers. Stuff that is specific to FireFox is found there.
Conkeror might be an interesting Firefox alternative.
MozMacs helps a little.
XKeymacs from 2007 adds emacs keybindings to all Windows apps. (via)
Unfortunately, setting Gtk environment variables doesn’t work on Win32. The best solution I’ve found is to edit C:\Program Files\Mozilla Firefox\res\builtin\platformHTMLBindings.xml
Also try the Keyconfig extension for Firefox, for browser function keys (ie, make “C-s” search instead of “C-f”).
Here’s my platformHTMLBindings.xml. You should be able to just overwrite your existing one.
<?xml version="1.0"?>
<bindings id="htmlBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="inputFields">
<handlers>
<handler event="keypress" keycode="VK_LEFT" command="cmd_charPrevious"/>
<handler event="keypress" keycode="VK_RIGHT" command="cmd_charNext"/>
<handler event="keypress" keycode="VK_LEFT" modifiers="shift"
command="cmd_selectCharPrevious"/>
<handler event="keypress" keycode="VK_RIGHT" modifiers="shift"
command="cmd_selectCharNext"/>
<!-- Cut/copy/paste/undo -->
<handler event="keypress" key="c" modifiers="accel" command="cmd_copy"/>
<handler event="keypress" key="x" modifiers="accel" command="cmd_cut"/>
<handler event="keypress" key="v" modifiers="accel" command="cmd_paste"/>
<handler event="keypress" key="z" command="cmd_redo" modifiers="accel,shift" />
<handler event="keypress" key="z" modifiers="accel" command="cmd_undo"/>
<!-- Emacsish single-line motion and delete keys -->
<handler event="keypress" key="a" modifiers="control"
command="cmd_beginLine"/>
<handler event="keypress" key="e" modifiers="control"
command="cmd_endLine"/>
<handler event="keypress" key="b" modifiers="control"
command="cmd_charPrevious"/>
<handler event="keypress" key="f" modifiers="control"
command="cmd_charNext"/>
<handler event="keypress" key="h" modifiers="control"
command="cmd_deleteCharBackward"/>
<handler event="keypress" key="d" modifiers="control"
command="cmd_deleteCharForward"/>
<handler event="keypress" key="w" modifiers="control"
command="cmd_deleteWordBackward"/>
<handler event="keypress" key="u" modifiers="control"
command="cmd_deleteToBeginningOfLine"/>
<handler event="keypress" key="k" modifiers="control"
command="cmd_deleteToEndOfLine"/>
<!-- Alternate Windows copy/paste/undo/redo keys -->
<handler event="keypress" keycode="VK_DELETE" modifiers="shift"
command="cmd_cutOrDelete"/>
<handler event="keypress" keycode="VK_DELETE" modifiers="control"
command="cmd_copyOrDelete"/>
<handler event="keypress" keycode="VK_INSERT" modifiers="control"
command="cmd_copy"/>
<handler event="keypress" keycode="VK_INSERT" modifiers="shift"
command="cmd_paste"/>
<!-- navigating by word keys -->
<handler event="keypress" keycode="VK_HOME"
command="cmd_beginLine"/>
<handler event="keypress" keycode="VK_END"
command="cmd_endLine"/>
<handler event="keypress" keycode="VK_HOME" modifiers="shift"
command="cmd_selectBeginLine"/>
<handler event="keypress" keycode="VK_END" modifiers="shift"
command="cmd_selectEndLine"/>
<handler event="keypress" keycode="VK_HOME" modifiers="control"
command="cmd_beginLine"/>
<handler event="keypress" keycode="VK_END" modifiers="control"
command="cmd_endLine"/>
<handler event="keypress" keycode="VK_HOME" modifiers="control,shift"
command="cmd_selectBeginLine"/>
<handler event="keypress" keycode="VK_END" modifiers="control,shift"
command="cmd_selectEndLine"/>
<handler event="keypress" keycode="VK_BACK" modifiers="control"
command="cmd_deleteWordBackward"/>
<handler event="keypress" keycode="VK_LEFT" modifiers="control"
command="cmd_wordPrevious"/>
<handler event="keypress" keycode="VK_RIGHT" modifiers="control"
command="cmd_wordNext"/>
<handler event="keypress" keycode="VK_LEFT" modifiers="shift,control"
command="cmd_selectWordPrevious"/>
<handler event="keypress" keycode="VK_RIGHT" modifiers="shift,control"
command="cmd_selectWordNext"/>
<handler event="keypress" key="y" modifiers="accel"
command="cmd_redo"/>
<handler event="keypress" key="a" modifiers="alt"
command="cmd_selectAll"/>
<handler event="keypress" keycode="VK_F20" command="cmd_cut" />
<handler event="keypress" keycode="VK_F16" command="cmd_copy" />
<handler event="keypress" keycode="VK_F18" command="cmd_paste" />
<handler event="keypress" keycode="VK_F14" command="cmd_undo" />
</handlers>
</binding>
<binding id="textAreas">
<handlers>
<handler event="keypress" keycode="VK_LEFT" command="cmd_charPrevious"/>
<handler event="keypress" keycode="VK_RIGHT" command="cmd_charNext"/>
<handler event="keypress" keycode="VK_LEFT" modifiers="shift"
command="cmd_selectCharPrevious"/>
<handler event="keypress" keycode="VK_RIGHT" modifiers="shift"
command="cmd_selectCharNext"/>
<handler event="keypress" keycode="VK_UP" command="cmd_linePrevious"/>
<handler event="keypress" keycode="VK_DOWN" command="cmd_lineNext"/>
<handler event="keypress" keycode="VK_UP" modifiers="shift"
command="cmd_selectLinePrevious"/>
<handler event="keypress" keycode="VK_DOWN" modifiers="shift"
command="cmd_selectLineNext"/>
<!-- Cut/copy/paste/undo -->
<handler event="keypress" key="c" modifiers="accel" command="cmd_copy"/>
<handler event="keypress" key="x" modifiers="accel" command="cmd_cut"/>
<handler event="keypress" key="v" modifiers="accel" command="cmd_paste"/>
<handler event="keypress" key="z" modifiers="accel" command="cmd_undo"/>
<handler event="keypress" key="z" command="cmd_redo" modifiers="accel,shift" />
<!-- Emacsish single-line motion and delete keys -->
<handler event="keypress" key="a" modifiers="control"
command="cmd_beginLine"/>
<handler event="keypress" key="e" modifiers="control"
command="cmd_endLine"/>
<handler event="keypress" id="key_left" key="b" modifiers="control"
command="cmd_charPrevious"/>
<handler event="keypress" id="key_right" key="f" modifiers="control"
command="cmd_charNext"/>
<handler event="keypress" id="key_delback" key="h" modifiers="control"
command="cmd_deleteCharBackward"/>
<handler event="keypress" id="key_delforw" key="d" modifiers="control"
command="cmd_deleteCharForward"/>
<handler event="keypress" id="key_delwback" key="w" modifiers="control"
command="cmd_deleteWordBackward"/>
<handler event="keypress" id="key_del_bol" key="u" modifiers="control"
command="cmd_deleteToBeginningOfLine"/>
<handler event="keypress" id="key_del_eol" key="k" modifiers="control"
command="cmd_deleteToEndOfLine"/>
<!-- Alternate Windows copy/paste/undo/redo keys -->
<handler event="keypress" keycode="VK_DELETE" modifiers="shift"
command="cmd_cutOrDelete"/>
<handler event="keypress" keycode="VK_DELETE" modifiers="control"
command="cmd_copyOrDelete"/>
<handler event="keypress" keycode="VK_INSERT" modifiers="control"
command="cmd_copy"/>
<handler event="keypress" keycode="VK_INSERT" modifiers="shift"
command="cmd_paste"/>
<!-- Emacsish multi-line motion and delete keys -->
<handler event="keypress" id="key_linedown" key="n" modifiers="control"
command="cmd_lineNext"/>
<handler event="keypress" id="key_lineup" key="p" modifiers="control"
command="cmd_linePrevious"/>
<!-- handle home/end/arrow keys and redo -->
<handler event="keypress" keycode="VK_HOME"
command="cmd_beginLine"/>
<handler event="keypress" keycode="VK_END"
command="cmd_endLine"/>
<handler event="keypress" keycode="VK_HOME" modifiers="shift"
command="cmd_selectBeginLine"/>
<handler event="keypress" keycode="VK_END" modifiers="shift"
command="cmd_selectEndLine"/>
<handler event="keypress" keycode="VK_HOME" modifiers="control"
command="cmd_moveTop"/>
<handler event="keypress" keycode="VK_END" modifiers="control"
command="cmd_moveBottom"/>
<handler event="keypress" keycode="VK_HOME" modifiers="shift,control"
command="cmd_selectTop"/>
<handler event="keypress" keycode="VK_END" modifiers="shift,control"
command="cmd_selectBottom"/>
<handler event="keypress" keycode="VK_PAGE_UP"
command="cmd_movePageUp"/>
<handler event="keypress" keycode="VK_PAGE_DOWN"
command="cmd_movePageDown"/>
<handler event="keypress" keycode="VK_PAGE_UP" modifiers="shift"
command="cmd_selectPageUp"/>
<handler event="keypress" keycode="VK_PAGE_DOWN" modifiers="shift"
command="cmd_selectPageDown"/>
<handler event="keypress" keycode="VK_LEFT" modifiers="control"
command="cmd_wordPrevious"/>
<handler event="keypress" keycode="VK_RIGHT" modifiers="control"
command="cmd_wordNext"/>
<handler event="keypress" keycode="VK_LEFT" modifiers="shift,control"
command="cmd_selectWordPrevious"/>
<handler event="keypress" keycode="VK_RIGHT" modifiers="shift,control"
command="cmd_selectWordNext"/>
<handler event="keypress" keycode="VK_BACK" modifiers="control"
command="cmd_deleteWordBackward"/>
<handler event="keypress" key="y" modifiers="accel"
command="cmd_redo"/>
<handler event="keypress" key="a" modifiers="alt"
command="cmd_selectAll"/>
<handler event="keypress" keycode="VK_F20" command="cmd_cut" />
<handler event="keypress" keycode="VK_F16" command="cmd_copy" />
<handler event="keypress" keycode="VK_F18" command="cmd_paste" />
<handler event="keypress" keycode="VK_F14" command="cmd_undo" />
</handlers>
</binding>
<binding id="browser">
<handlers>
<handler event="draggesture">
<!--
nsDragAndDrop.startDrag(event, contentAreaDNDObserver);
-->
</handler>
<handler event="dragover">
<!--
nsDragAndDrop.dragOver(event, contentAreaDNDObserver);
-->
</handler>
<handler event="dragdrop">
<!--
nsDragAndDrop.drop(event, contentAreaDNDObserver);
-->
</handler>
<handler event="keypress" key=" " modifiers="shift" command="cmd_scrollPageUp" />
<handler event="keypress" key=" " command="cmd_scrollPageDown" />
<handler event="keypress" keycode="VK_UP" command="cmd_scrollLineUp" />
<handler event="keypress" keycode="VK_DOWN" command="cmd_scrollLineDown" />
<handler event="keypress" keycode="VK_LEFT" command="cmd_scrollLeft" />
<handler event="keypress" keycode="VK_RIGHT" command="cmd_scrollRight" />
<handler event="keypress" keycode="VK_HOME" command="cmd_scrollTop"/>
<handler event="keypress" keycode="VK_END" command="cmd_scrollBottom"/>
<handler event="keypress" key="x" command="cmd_cut" modifiers="accel"/>
<handler event="keypress" key="c" command="cmd_copy" modifiers="accel"/>
<handler event="keypress" key="v" command="cmd_paste" modifiers="accel"/>
<handler event="keypress" key="z" command="cmd_undo" modifiers="accel"/>
<handler event="keypress" key="z" command="cmd_redo" modifiers="accel,shift" />
<handler event="keypress" key="a" command="cmd_selectAll" modifiers="accel"/>
<handler event="keypress" key="/" command="cmd_findTypeText"/>
<handler event="keypress" key="'" command="cmd_findTypeLinks"/>
<handler event="keypress" keycode="VK_PAGE_UP" command="cmd_movePageUp"/>
<handler event="keypress" keycode="VK_PAGE_DOWN" command="cmd_movePageDown"/>
<handler event="keypress" keycode="VK_PAGE_UP" modifiers="shift" command="cmd_selectPageUp"/>
<handler event="keypress" keycode="VK_PAGE_DOWN" modifiers="shift" command="cmd_selectPageDown"/>
<handler event="keypress" keycode="VK_DELETE" modifiers="shift" command="cmd_cut" />
<handler event="keypress" keycode="VK_DELETE" modifiers="control" command="cmd_copy" />
<handler event="keypress" keycode="VK_INSERT" modifiers="control" command="cmd_copy" />
<handler event="keypress" keycode="VK_HOME" modifiers="shift,control" command="cmd_selectTop" />
<handler event="keypress" keycode="VK_END" modifiers="shift,control" command="cmd_selectBottom" />
<handler event="keypress" keycode="VK_F20" command="cmd_cut" />
<handler event="keypress" keycode="VK_F16" command="cmd_copy" />
<handler event="keypress" keycode="VK_F18" command="cmd_paste" />
<handler event="keypress" keycode="VK_F14" command="cmd_undo" />
<handler event="keypress" keycode="VK_LEFT" modifiers="control" command="cmd_wordPrevious" />
<handler event="keypress" keycode="VK_RIGHT" modifiers="control" command="cmd_wordNext" />
<handler event="keypress" keycode="VK_LEFT" modifiers="control,shift" command="cmd_selectWordPrevious" />
<handler event="keypress" keycode="VK_RIGHT" modifiers="control,shift" command="cmd_selectWordNext" />
<handler event="keypress" keycode="VK_LEFT" modifiers="shift" command="cmd_selectCharPrevious" />
<handler event="keypress" keycode="VK_RIGHT" modifiers="shift" command="cmd_selectCharNext" />
<handler event="keypress" keycode="VK_HOME" modifiers="shift" command="cmd_selectBeginLine" />
<handler event="keypress" keycode="VK_END" modifiers="shift" command="cmd_selectEndLine" />
<handler event="keypress" keycode="VK_UP" modifiers="shift" command="cmd_selectLinePrevious" />
<handler event="keypress" keycode="VK_DOWN" modifiers="shift" command="cmd_selectLineNext" />
<handler event="keypress" key="a" modifiers="alt" command="cmd_selectAll"/>
</handlers>
</binding>
<binding id="editor">
<handlers>
<handler event="keypress" keycode="VK_LEFT" command="cmd_charPrevious"/>
<handler event="keypress" keycode="VK_RIGHT" command="cmd_charNext"/>
<handler event="keypress" keycode="VK_LEFT" command="cmd_selectCharPrevious" modifiers="shift"/>
<handler event="keypress" keycode="VK_RIGHT" command="cmd_selectCharNext" modifiers="shift"/>
<handler event="keypress" keycode="VK_UP" command="cmd_linePrevious"/>
<handler event="keypress" keycode="VK_DOWN" command="cmd_lineNext"/>
<handler event="keypress" keycode="VK_UP" command="cmd_selectLinePrevious" modifiers="shift"/>
<handler event="keypress" keycode="VK_DOWN" command="cmd_selectLineNext" modifiers="shift"/>
<handler event="keypress" key="z" command="cmd_undo" modifiers="accel"/>
<handler event="keypress" key="z" command="cmd_redo" modifiers="accel,shift" />
<handler event="keypress" key="x" command="cmd_cut" modifiers="accel"/>
<handler event="keypress" key="c" command="cmd_copy" modifiers="accel"/>
<handler event="keypress" key="v" command="cmd_paste" modifiers="accel"/>
<handler event="keypress" key="h" modifiers="control" command="cmd_deleteCharBackward"/>
<handler event="keypress" key="d" modifiers="control" command="cmd_deleteCharForward"/>
<handler event="keypress" key="k" modifiers="control" command="cmd_deleteToEndOfLine"/>
<handler event="keypress" key="u" modifiers="control" command="cmd_deleteToBeginningOfLine"/>
<handler event="keypress" key="a" modifiers="control" command="cmd_beginLine"/>
<handler event="keypress" key="e" modifiers="control" command="cmd_endLine"/>
<handler event="keypress" key="b" modifiers="control" command="cmd_charPrevious"/>
<handler event="keypress" key="f" modifiers="control" command="cmd_charNext"/>
<handler event="keypress" key="p" modifiers="control" command="cmd_linePrevious"/>
<handler event="keypress" key="n" modifiers="control" command="cmd_lineNext"/>
<handler event="keypress" key="x" modifiers="control" command="cmd_cut"/>
<handler event="keypress" key="c" modifiers="control" command="cmd_copy"/>
<handler event="keypress" key="v" modifiers="control" command="cmd_paste"/>
<handler event="keypress" key="z" modifiers="control" command="cmd_undo"/>
<handler event="keypress" key="y" modifiers="accel" command="cmd_redo"/>
<handler event="keypress" key="a" modifiers="alt" command="cmd_selectAll"/>
<handler event="keypress" keycode="VK_DELETE" modifiers="shift" command="cmd_cutOrDelete"/>
<handler event="keypress" keycode="VK_DELETE" modifiers="control" command="cmd_copyOrDelete"/>
<handler event="keypress" keycode="VK_INSERT" modifiers="control" command="cmd_copy"/>
<handler event="keypress" keycode="VK_INSERT" modifiers="shift" command="cmd_paste"/>
<handler event="keypress" keycode="VK_LEFT" modifiers="control" command="cmd_wordPrevious"/>
<handler event="keypress" keycode="VK_RIGHT" modifiers="control" command="cmd_wordNext"/>
<handler event="keypress" keycode="VK_LEFT" modifiers="shift,control" command="cmd_selectWordPrevious"/>
<handler event="keypress" keycode="VK_RIGHT" modifiers="shift,control" command="cmd_selectWordNext"/>
<handler event="keypress" keycode="VK_BACK" modifiers="control" command="cmd_deleteWordBackward"/>
<handler event="keypress" keycode="VK_HOME" command="cmd_beginLine"/>
<handler event="keypress" keycode="VK_END" command="cmd_endLine"/>
<handler event="keypress" keycode="VK_HOME" modifiers="shift" command="cmd_selectBeginLine"/>
<handler event="keypress" keycode="VK_END" modifiers="shift" command="cmd_selectEndLine"/>
<handler event="keypress" keycode="VK_HOME" modifiers="shift,control" command="cmd_selectTop"/>
<handler event="keypress" keycode="VK_END" modifiers="shift,control" command="cmd_selectBottom"/>
<handler event="keypress" keycode="VK_HOME" modifiers="control" command="cmd_moveTop"/>
<handler event="keypress" keycode="VK_END" modifiers="control" command="cmd_moveBottom"/>
<handler event="keypress" keycode="VK_PAGE_UP" command="cmd_movePageUp"/>
<handler event="keypress" keycode="VK_PAGE_DOWN" command="cmd_movePageDown"/>
<handler event="keypress" keycode="VK_PAGE_UP" modifiers="shift" command="cmd_selectPageUp"/>
<handler event="keypress" keycode="VK_PAGE_DOWN" modifiers="shift" command="cmd_selectPageDown"/>
<handler event="keypress" keycode="VK_F20" command="cmd_cut" />
<handler event="keypress" keycode="VK_F16" command="cmd_copy" />
<handler event="keypress" keycode="VK_F18" command="cmd_paste" />
<handler event="keypress" keycode="VK_F14" command="cmd_undo" />
</handlers>
</binding>
</bindings>