Re:I've been writing TILs for 5 years
by 1998v2 on Saturday April 18, 2020 @07:33PM
(#22912045)
I want this badly on gnome-terminal. If anyone has this type if thing on a linux plz. advise.
[ Parent
| on HN ]
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.
Re:I've been writing TILs for 5 years
by Something1234 on Saturday April 18, 2020 @10:19PM
(#22912919)
!! is more useful than you think. It's substitute last command here, not just up-arrow enter.
See sudo !!.
Re:I've been writing TILs for 5 years
by chrisweekly on Saturday April 18, 2020 @10:55PM
(#22913108)
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).