Skip to content

Comment on Linenoise - A minimal, zero-config, BSD licensed, readline replacementparent

Comments

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

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.