diff options
author | Marc Cornellà <marc.cornella@live.com> | 2021-01-04 21:41:11 +0100 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2021-01-04 21:41:11 +0100 |
commit | 2118d35e017eb8c599f3c25863c8263aca307541 (patch) | |
tree | 199cac09650e3a7596671ab52c63322b05542dbc /plugins/vi-mode/vi-mode.plugin.zsh | |
parent | 79980b00fb146437231c2a110ea49032b842c92c (diff) | |
download | zsh-2118d35e017eb8c599f3c25863c8263aca307541.tar.gz zsh-2118d35e017eb8c599f3c25863c8263aca307541.tar.bz2 zsh-2118d35e017eb8c599f3c25863c8263aca307541.zip |
fix(vi-mode)!: add back edit-command-line key binding as 'vv' (#9573)
BREAKING CHANGE: the key binding to open an editor to edit the command line has
been moved from being `v` (press v once) to being `vv` (press v twice). Now, the
action for `v` is the default `visual-mode`, as is in Vim.
Fixes #9573
Diffstat (limited to 'plugins/vi-mode/vi-mode.plugin.zsh')
-rw-r--r-- | plugins/vi-mode/vi-mode.plugin.zsh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/vi-mode/vi-mode.plugin.zsh b/plugins/vi-mode/vi-mode.plugin.zsh index e5b252d83..0b11a6a7f 100644 --- a/plugins/vi-mode/vi-mode.plugin.zsh +++ b/plugins/vi-mode/vi-mode.plugin.zsh @@ -64,6 +64,11 @@ zle -N zle-line-finish bindkey -v +# allow vv to edit the command line (standard behaviour) +autoload -Uz edit-command-line +zle -N edit-command-line +bindkey -M vicmd 'vv' edit-command-line + # allow ctrl-p, ctrl-n for navigate history (standard behaviour) bindkey '^P' up-history bindkey '^N' down-history |