- Ctrl+A or Home: Go to the beginning of the line.
- Ctrl+E or End: Go to the end of the line.
Zsh Bindings:
bindkey "^[[H" beginning-of-line
bindkey "^[[F" end-of-line
- Alt+F: Go right (forward) one word.
- Alt+B: Go left (back) one word.
Zsh Bindings:
shift-arrow() {
((REGION_ACTIVE)) || zle set-mark-command
zle $1
}
shift-left() shift-arrow backward-char
shift-right() shift-arrow forward-char
zle -N shift-left
zle -N shift-right
bindkey $terminfo[kLFT] shift-left
bindkey $terminfo[kRIT] shift-right
- Ctrl+W: Cut word before cursor.
- Ctrl+K: Cut rest of the line after cursor.
- Ctrl+U: Cut rest of line before cursor.
- Ctrl+Y: Paste ("yank") the last cut from the clipboard.
- Ctrl+R: Search a command.
- Ctrl+O: Run a command you found with Ctrl+R.
- Ctrl+G: Exit searching for a command.
ctrl+v, <any key>
will show you the sequence code.
Useful for creating more zsh keybinds.
Example: ctrl+V, upKey
ctrl+q
ctrl+u
ctrl+w
alt+t
no idea why you would ever need this
ctrl+l
- Ctrl+F: Go right (forward) one character.
- Ctrl+B: Go left (back) one character.
- ctrl+XX: Move between the beginning of the line and the current position of the cursor. This allows you to press Ctrl+XX to return to the start of the line, change something, and then press Ctrl+XX to go back to your original cursor position.