Hacker News new | ask | show | jobs
by _ncxu 3276 days ago
Also CTRL-_ which is "undo whatever you just typed"
4 comments

That is a great one I didn't know (and I've been a 'nix monkey professionally since 2005). Thanks!
I was using CTRL+C to open new prompt instead of undoing. Thanks for this.
Ok, but where is the "redo" option?
pressing CTRL-w a few times feels easier to me, less awkward key combination
CTRL-w just deletes a word at a time. CTRL-_ it appears doesn't just delete the whole line you just typed, it does undo of the thing you just typed... counting backspace as "one thing you just typed" -- so it does some things you can't achieve with CTRL+w, you can even get back some text that you just erased.

I never knew this shortcut before. (I will probably never use it...)