mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
39 lines
619 B
Plaintext
39 lines
619 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, common]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# bindkey
|
|
|
|
> Add keybindings to Z-Shell.
|
|
> More information: <https://zsh.sourceforge.io/Guide/zshguide04.html>.
|
|
|
|
- Bind a hotkey to a specific command:
|
|
|
|
`bindkey "{{^k}}" {{kill-line}}`
|
|
|
|
- Bind a hotkey to a specific key [s]equence:
|
|
|
|
`bindkey -s '^o' 'cd ..
|
|
'`
|
|
|
|
- [l]ist keymaps:
|
|
|
|
`bindkey -l`
|
|
|
|
- View the hotkey in a key[M]ap:
|
|
|
|
`bindkey -M main`
|
|
|
|
- Enable [v]i mode:
|
|
|
|
`bindkey -v`
|
|
|
|
- Enable [e]macs mode (default mode):
|
|
|
|
`bindkey -e`
|
|
|
|
- Check which mode is active (vi or emacs):
|
|
|
|
`bindkey -lL main | grep -Eo 'viins|emacs'`
|