Keys
In the shell, ? on an empty line shows these, and /keys prints them.
General
?- Show or hide these keys, on an empty line
/- Open the command menu
ctrl+s- Search all commands; while searching history, go to a newer match
ctrl+o- Show all of a long output, or shorten it again
ctrl+l- Clear the screen
ctrl+c- Clear the line; on an empty line, leave tula
ctrl+d- Delete the character under the cursor; on an empty line, leave tula
Esc- Close a list, the command search or these keys; cancel removing a venue
Enter- While something is running, save what you typed to run next
Escctrl+c- Stop an answer while it is being written; ctrl+c clears what you typed first
↑- On an empty line, bring back the last line waiting to run, to edit it
Editing
ctrl+aHome- Go to the start of the line
ctrl+eEnd- Go to the end of the line
ctrl+b←- Move back one character
ctrl+f→- Move forward one character
alt+bctrl+←alt+←- Move back one wordalt needs Option as Meta on macOS
alt+fctrl+→alt+→- Move forward one wordalt needs Option as Meta on macOS
ctrl+w- Delete back to the previous space
alt+backspace- Delete the word before the cursoralt needs Option as Meta on macOS
alt+d- Delete the word after the cursoralt needs Option as Meta on macOS
ctrl+u- Delete to the start of the line
ctrl+k- Delete to the end of the line; at its end, join the next line
ctrl+y- Put back what was last deleted
Delete- Delete the character under the cursor
ctrl+t- Swap the two characters around the cursor
ctrl+_- Undo the last edit
History
↑ctrl+p- Move up a line; on the top line, show the line you sent before
↓ctrl+n- Move down a line; on the bottom line, show the next line you sent
ctrl+r- Search what you sent before — ctrl+r for older, Enter to run, Esc to edit, ctrl+g to cancel
Lists and suggestions
↑ ↓ctrl+p ctrl+n- Move through an open list
Enter- Run the highlighted command; in a list of choices for a command, put the choice on the line
Tab- Put the highlighted command on the line; with no list open, accept the suggestion
→ctrl+fctrl+e- At the end of the line, accept the suggestion shown after the cursor
alt+f- Accept one word of the suggestionalt needs Option as Meta on macOS
More than one line
Enter- Send what you typed
ctrl+j- Start a new line — works in every terminal
shift+Enter- Start a new lineneeds a terminal that sends it — one with the kitty keyboard protocol, or tmux with extended-keys
alt+Enterctrl+Enter- Start a new linealt needs Option as Meta on macOS; ctrl+Enter needs a terminal that sends it
\ then Enter- Start a new line; the backslash is removed
Vim mode — after /vim
Esc- Switch to NORMAL mode; if a list is open, the first Esc closes it
i aI Ao O- Switch to INSERT mode: before or after the cursor, at the start or end of the line, or on a new line below or above
h lj k- Left and right; up and down a line, and to earlier or later lines you sent from the top or bottom line
w e bW E B- Move by word; the capitals count everything between spaces as one word
0 ^ $gg G- Go to the start, the first character or the end of the line; to the first or last line
f F t T; ,- Jump to a character on the line; repeat the jump, or repeat it backwards
d c ydd cc yyD C- Delete, change or copy as far as the next move goes; the whole line; to the end of the line
x r ~ Jp P- Delete a character, replace it, switch its case, join lines; paste after or before
iw awi" a"i( a(i[ a[i{ a{- After d, c or y: inside or around a word, quotes or brackets
3dw.u- Repeat a command a number of times; repeat the last change; undo
/?- Open the command menu; show these keys