Here are some tricks that helped me drastically improve my workflow in the terminal. I will still continue to update this post as I go in case I find some new cool tricks that help me ‘ninja’ my way through the terminal. This will probably serve as the backup for my tmux and vim configs too :D

Emacs shortcuts

# moving the cursor around
ctrl + a = to the beginning of the line
ctrl + e = to the beginning of the line
ctrl + b = move back one character = left arrow
alt + b = move to the beginning of the word
ctrl + f = move forward one character = right arrow
alt + f = move forward by one word to the next whitespace
ctrl + n = next command from history = up arrow
ctrl + p = previous command from history = down arrow
ctrl + xx = move between the beginning of the line and the current position of the cursor. This lets you return to the start of the line, change something there, and then go back to your original cursor position. Do note that if you add or delete something at the beginning of the line, the original cursor position will be adjusted accordingly by the number of characters you add or delete

# editing
ctrl + m = enter the command
ctrl + l = clear the terminal
ctrl + c = cancel the current line. The line will still remain on the terminal without being entered
ctrl + h =  backspace = ctrl + h
ctrl + d = delete the character where the cursor is = reverse backspace
ctrl + - = undo
atl + t = swap the current word with the previous word
ctrl + t = Swap the last two characters before the cursor with each other

# search
ctrl + r = search command in history
ctrl + j = end the search at the current line
ctrl + g = cancel the search

# copy and paste - it doesn't use the sytem clipboard
ctrl + u = cut from the cursor to the beginning of the line
ctrl + k = cut from the cursor to the end of the line
ctrl + w = cut characters on the left, until the beginning of the word
ctrl + y = paste

# output
ctrl + s = stop all output to the screen. This is particularly useful when running commands with a lot of long, verbose output, and you want to stop to examine the ouput but you don’t want to stop the command itself with ctrl + c
ctrl + q = resume output to the screen after stopping it with ctrl + s = pressing any key after ctrl + s actually lol


to be added


to be added