jsMacs 0.0000...1
A demonstration of text editing in the browser, with the arbitrary
avoidance of useful Javascript libraries.
- Works best on Firefox for Linux and Windows. Doesn't work in
Chrome. Doesn't work well on a Mac.
- Does this work in IE? Who knows.
- On Mac OS X, I think some of the keyboard shortcuts seem
impossible. For that reason, it only works partly on Mac OS X.
There might be some way around this.
- There exists a quite suboptimal choice of algorithms.
You can undo and redo using C-_, and you can copy and paste text
using C-y, M-y, C-k, M-d, C-w, etc, like you do in Emacs. It has the
usual kill ring and undo ring behavior that you'd expect.
A full list of keybindings:
C-a: moveToBeginningOfLine()
C-b: moveLeft(1)
M-b: backwardWord()
C-d: deleteRight(1)
M-d: deleteForwardWord()
C-e: moveToEndOfLine()
C-f: moveRight(1)
M-f: forwardWord()
C-k: killLine()
C-n: moveDown()
C-p: moveUp()
C-w: killRegion()
C-y: yank()
M-y: altYank()
C-_: undo()
<space>: appendLeft(" ")
<C-space>: setMark()
<backspace>: deleteLeft(1)
<C-backspace>: deleteBackwardWord()
<M-backspace>: deleteBackwardWord()
<return>: appendLeft("\n")
<delete>: C-d
<M-delete>: M-d
<left>: moveLeft(1)
<right>: moveRight(1)
<up>: moveUp()
<down>: moveDown()
<end>: moveToEndOfLine()
<home>: moveToBeginningOfLine()