- Cycle backwards through your command history with
Ctrl+p
- Cycle forwards through your command history with
Ctrl+n
- Search backwards through your command history with
Ctrl+r
, search a term and hit Enter to run that command - Clear a whole line you've typed on the
Ctrl+u
, you can also use this to get out of searching your history - Jump to the beginning of a line of text with
Ctrl+a
- Jump to the end of a line of text with
Ctrl+e
- Cut text from the cursor position to the end of the line with
Ctrl+k
- Jump back a word with
Escape+b
- Jump forward a word with
Escape+f
- Note that if
Escape
is awkward to use for youCtrl+[
will act as escape anywhere in your terminal, vim included - On a related note but entirley in the wrong guide, in vim
Ctrl+c
takes you back to normal mode. For some people this is more desirable than using theEscape
key or usingCtrl+[
as escape just to get back to normal mode. - You can refer to the argument of the last command with
!$
, you can remember this easily as getting more 'bang for your buck', for exampletouch ~/Desktop/tmp.txt
and thenvim !$
- You can rerun the last command with
!!
Make it a point to really embrace searching your history for commands. Getting comfortable with this will speed you up tremendously, as usually the command you intend to type you have already typed before.