Hacker News new | past | comments | ask | show | jobs | submit login

I agree, but also can recommend a few good shortcuts...

<c-a> = go to beginning of line

<c-e> = go to end of line

!! = repeat last command

<esc> b = move "back" one word (also <c-b> and <c-left>)

<esc> f = move "forward" one word (also <c-f> and <c-right>)

Many others exist. See `man bash` under READLINE.




By the way, recently discovered you can get some of these shortcuts in all input boxes by activating “emacs shortcuts” inside of gnome-tweaks! Was one of the final blockers for getting me from Mac to Linux


You can also use the more standard Home/End/Ctrl+Left/Ctrl+Right to do all of the above. Much easier to remember and works in any other editor also.


!cmd = repeat last usage of that command

!!enter which is 3 buttons where as up-arrow enter is the same thing.


!! is more useful than you think. It's substitute last command here, not just up-arrow enter.

See sudo !!.


Yes! I use c-u to clear the line all the time.


And <c-w> clears the previous word :) Also <c-y> pastes the line/word back in (so you cant think of it like cut-copy).




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: