zsh: add key bindings
This commit is contained in:
parent
56f97684a8
commit
1f3d8d824c
1 changed files with 15 additions and 4 deletions
|
@ -35,12 +35,23 @@ zle -N zle-keymap-select keymap_did_change
|
||||||
bindkey -v
|
bindkey -v
|
||||||
export KEYTIMEOUT=1
|
export KEYTIMEOUT=1
|
||||||
|
|
||||||
|
# Restore some common and useful emacs mode shortcuts.
|
||||||
|
bindkey -M viins '^a' vi-beginning-of-line
|
||||||
|
bindkey -M viins '^e' vi-end-of-line
|
||||||
|
bindkey -M viins '^l' clear-screen
|
||||||
|
bindkey -M viins '^[.' insert-last-word
|
||||||
|
|
||||||
# Search through history in insert mode.
|
# Search through history in insert mode.
|
||||||
bindkey -M viins '^j' history-beginning-search-forward
|
bindkey -M viins '^j' history-beginning-search-forward
|
||||||
bindkey -M viins '^k' history-beginning-search-backward
|
bindkey -M viins '^k' history-beginning-search-backward
|
||||||
|
|
||||||
# Restore some common and useful emacs mode shortcut.
|
# Incremental search
|
||||||
bindkey -M viins '^a' vi-beginning-of-line
|
bindkey -M viins '^r' history-incremental-search-backward
|
||||||
bindkey -M viins '^e' vi-end-of-line
|
bindkey -M isearch '^j' history-incremental-search-forward
|
||||||
bindkey -M viins '^l' clear-screen
|
bindkey -M isearch '^k' history-incremental-search-backward
|
||||||
|
bindkey -M isearch '^y' accept-search
|
||||||
|
|
||||||
|
# Move word-wise with Alt.
|
||||||
|
bindkey -M viins '^[b' vi-backward-word
|
||||||
|
bindkey -M viins '^[f' vi-forward-word
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue