Looks really nice. I'm just being nitpicky, but in case antirez is hanging around:
* Ctrl-B seems to make the cursor go forward, instead of backward.
* Ctrl-T could transpose two characters, but also goes forward.
* Ctrl-P/Ctrl-N could act as up and down arrow keys, too.
And I'm not sure if Ctrl-D should do anything by default, but I pressed it instinctively expecting it to close the (example) program.
Depends on what your definition of transpose is. I guess I always just looked as it as transposing the characters to the left of and to the right of the cursor and then moving the cursor right, which I guess is dragging a character forward. You learn something new every day!
They're of course the same thing, I just found the mental model of dragging forward to be simpler (in either model you still have a special case for the end of a line). I may have had someone point this out to me, I learned EMACS in 1980 and half my professional work in the '80s was on various UNIX and LISP versions of EMACS.
And it adds to your editing toolkit, you can not only transpose two characters, you can also drag one a few positions forward, which for the way I (mis)type is useful ^_^.
* Ctrl-B seems to make the cursor go forward, instead of backward. * Ctrl-T could transpose two characters, but also goes forward. * Ctrl-P/Ctrl-N could act as up and down arrow keys, too.
And I'm not sure if Ctrl-D should do anything by default, but I pressed it instinctively expecting it to close the (example) program.