1
1
Fork 0

zshrc: Switch to vi mode with some emacs bindings

This provides the best of both worlds.
This commit is contained in:
Jonathan Schleifer 2016-09-28 19:26:01 +00:00
parent 7957ab5bf7
commit 9e10eab956

14
zshrc
View file

@ -17,7 +17,19 @@ FEMALE="no" # Whether the user is female ;)
LISTMAX=32768
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_nomatch
setopt extended_glob