zsh Shortcuts
Line Editor
Movement
Remove
Modify
Undo
Command_History
Line Editor
Movement
Alt+b or Esc,b : backward-word
- move to the beginning of the previous word
Alt+f or Esc,f : forward-word
- move forward one word
Ctrl+a : beginning-of-line
- move to the beginning of the line
Ctrl+e : end-of-line
- move to the end of the line
Remove
Ctrl+w or Ctrl+Alt+h : backward-kill-word
- kill the word left from the cursor
Alt+d or Esc,d : kill-word
- kill the word right from the cursor
Ctrl+u : kill-whole-line
- kill the current line
Ctrl+k : kill-line
- kill from the cursor to the end of the line
✘ : backward-kill-line
- kill from the cursor to the end of the line
Modify
Alt+l or Esc,l : down-case-word
- convert the current word to all lowercase and move cursor to the end of word
Alt+u or Esc,u : up-case-word
- convert the current word to all caps and move cursor to the end of word
Alt+c or Esc,c : capitalize-word
- capitalize the current word and move cursor to the end of word
Ctrl+t : transpose-chars
- exchange left and right to the cursor characters. If cursor is at the end of line, then exchange
two last characters
Alt+t or Esc,t : transpose-words
- exchange the current word with the one before it
Undo
Ctrl+x,u or Ctrl+Alt+_ : undo
- undo the last text modification
Command History
Ctrl+r : history-incremental-search-backward
- Search in the command history backward
Ctrl+p : up-line-or-history
- move to the previous event in the history list
Ctrl+n : down-line-or-history
- move to the next event in the history list
Alt+p : history-search-backward
- search backward in the history for a line with the string in the buffer
Alt+n : history-search-forward
- search forward in the history for a line with the string in the buffer
Ctrl+g or Ctrl+Alt+g : send-break
- abort the search
References
The Z Shell Manual