Here are some tricks you can use to be able to stay on the home row (asdfghjkl etc) when you're in a terminal or in vim.
<Ctrl>+l
Clear the terminal<Ctrl>+a
go to beginning of line<Ctrl>+e
go to end of line<Ctrl>+p
instead of<Up>
, to see previous command<Ctrl>+n
instead of<Down>
, to see next command<Ctrl>+k + <Ctrl>+u
Cut current command<Ctrl>+y
Paste command
<Ctrl>+u
to clear the current line<Ctrl>+j
instead of<Enter>
<Ctrl>+h
instead of<Backspace>
<Ctrl>+w
instead of<Alt>+<Backspace>
to erase current word<Ctrl>+i
instead of<Tab>
<Ctrl>+ä
instead of<Esc>
(or<Ctrl>+[
depending on your keyboard layout)
If you are confused by some of this, then take a look at this excellent article
But why is the escape key triggered by the
[
character? Why not another character? https://garbagecollected.org/2017/01/31/four-column-ascii/
More goodies here https://superuser.com/a/362115/299642
and here http://teohm.com/blog/shortcuts-to-move-faster-in-bash-command-line/
<Esc> .
to repeat last argument of previous command<Esc> b
to jump backward to previous word<Esc> f
to jump forward to next word