Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



I'm not too familiar with readline, but traditional EMACS behavior is for ^T to drag a character forward, and only transpose at the end of a line.

And thanks a LOT for writing this; as I'm sure you know, the GPLed readline has caused a lot of heartburn for years and years.


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 ^_^.


Hello, thanks spicyj, I'll try to get this fixed asap.


Just pushed all the suggested changes. Thanks.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: