chan.dev / posts

Readline

shortcutoutcome
ctrl-amove to the beginning of the line
ctrl-bmove backward one character
ctrl-ddelete the character forward
ctrl-emove to the end of the line
ctrl-fmove forward one character
ctrl-ocreate new line below cursor
ctrl-pmove up one line
Meta-fmove forward one word
Meta-pmove back one word
ctrl-nmove down one line
ctrl-hdelete the character before the cursor
ctrl-kcut from the cursor to the end of the line
ctrl-lclearn the screen
ctrl-oopen a new line below the current line
ctrl-tswap the character before the cursor with the character under the cursor
ctrl-vmove to last character in file
ctrl-wdelete the word before the cursor
ctrl-yyank (paste)
ctrl-kdelete from the cursor to the end of the line

On a Mac, Meta is ctrl + opt.