33900dfd328ea21954cc7772af21e5d44ea71f3f
- Author
- Daniel Campoverde [alx741] <alx741@riseup.net>
- Committer
- Daniel Campoverde [alx741] <alx741@riseup.net>
- Date
Message
PLUGINS: vi-mode: allow ctrl-h, ctrl-?, ctrl-w for char and word deletion
Allow ctrl-h, ctrl-?, ctrl-w after changes in normal mode.
Diff
1diff --git a/plugins/vi-mode/vi-mode.plugin.zsh b/plugins/vi-mode/vi-mode.plugin.zsh
2index 45ec22a095b1e926d71a1ae3a072835f3856f544..1de8bf91a9b025a39beed35f3d296826e8d541f5 100644
3--- a/plugins/vi-mode/vi-mode.plugin.zsh
4+++ b/plugins/vi-mode/vi-mode.plugin.zsh
5@@ -38,6 +38,11 @@ bindkey -M vicmd 'v' edit-command-line
6 bindkey '^P' up-history
7 bindkey '^N' down-history
8
9+# allow ctrl-h, ctrl-w, ctrl-? for char and word deletion (standard behaviour)
10+bindkey '^?' backward-delete-char
11+bindkey '^h' backward-delete-char
12+bindkey '^w' backward-kill-word
13+
14 # if mode indicator wasn't setup by theme, define default
15 if [[ "$MODE_INDICATOR" == "" ]]; then
16 MODE_INDICATOR="%{$fg_bold[red]%}<%{$fg[red]%}<<%{$reset_color%}"