summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/vi-mode/README.md14
-rw-r--r--plugins/vi-mode/vi-mode.plugin.zsh5
2 files changed, 13 insertions, 6 deletions
diff --git a/plugins/vi-mode/README.md b/plugins/vi-mode/README.md
index 41faf2de0..b59d5f279 100644
--- a/plugins/vi-mode/README.md
+++ b/plugins/vi-mode/README.md
@@ -60,6 +60,12 @@ NOTE: some of these key bindings are set by zsh by default when using a vi-mode
- `/` : Search backward in history
- `n` : Repeat the last `/`
+### Vim edition
+
+- `vv` : Edit current command line in Vim
+
+NOTE: this used to be bound to `v`. That is now the default (`visual-mode`)
+
### Movement
- `$` : To the end of the line
@@ -99,9 +105,5 @@ NOTE: some of these key bindings are set by zsh by default when using a vi-mode
- `C` : Delete to the end of the line and start insert
- `r{char}` : Replace the character under the cursor with {char}
- `R` : Enter replace mode: Each character replaces existing one
-- `x` : Delete [count] characters under and after the cursor
-- `X` : Delete [count] characters before the cursor
-
-### Removed key bindings
-
-- `v` : Edit current command line in Vim
+- `x` : Delete `count` characters under and after the cursor
+- `X` : Delete `count` characters before the cursor
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