zshrc: Switch to vi mode with some emacs bindings
This provides the best of both worlds.
This commit is contained in:
parent
7957ab5bf7
commit
9e10eab956
1 changed files with 13 additions and 1 deletions
14
zshrc
14
zshrc
|
@ -17,7 +17,19 @@ FEMALE="no" # Whether the user is female ;)
|
||||||
LISTMAX=32768
|
LISTMAX=32768
|
||||||
WORDCHARS="*?[];!#~"
|
WORDCHARS="*?[];!#~"
|
||||||
|
|
||||||
bindkey -e
|
bindkey -v
|
||||||
|
# history-incremental-search-backward is much more useful than
|
||||||
|
# _history-complete-*
|
||||||
|
bindkey "^R" history-incremental-search-backward
|
||||||
|
# Add a few other emacs bindings for convenience, as it's sometimes quicker to
|
||||||
|
# use those than to switch between modes.
|
||||||
|
bindkey "^A" beginning-of-line
|
||||||
|
bindkey "^E" end-of-line
|
||||||
|
bindkey "^D" delete-char-or-list
|
||||||
|
# backward-kill-word behaves more like vim, whereas vi-backward-kill-word is
|
||||||
|
# the vi behaviour.
|
||||||
|
bindkey "^W" backward-kill-word
|
||||||
|
|
||||||
setopt no_bg_nice
|
setopt no_bg_nice
|
||||||
setopt no_nomatch
|
setopt no_nomatch
|
||||||
setopt extended_glob
|
setopt extended_glob
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue