d9683974fed169df0d0cf4d2231cb011f17b775e
- Author
- Robby Russell <robby@planetargon.com>
- Committer
- Robby Russell <robby@planetargon.com>
- Date
Message
Merge pull request #2605 from mhauserr/patch-1
Added v as a keybinding to edit-command-line in vi-mode
Diff
1diff --git a/plugins/vi-mode/vi-mode.plugin.zsh b/plugins/vi-mode/vi-mode.plugin.zsh
2index a06100472a9710b1bc112121239a2b169f898f88..3ed32b3fb29decd731c6780a73f757f8945c6bd6 100644
3--- a/plugins/vi-mode/vi-mode.plugin.zsh
4+++ b/plugins/vi-mode/vi-mode.plugin.zsh
5@@ -17,9 +17,15 @@ function zle-keymap-select zle-line-init zle-line-finish {
6 zle -N zle-line-init
7 zle -N zle-line-finish
8 zle -N zle-keymap-select
9+zle -N edit-command-line
10+
11
12 bindkey -v
13
14+# allow v to edit the command line (standard behaviour)
15+autoload -Uz edit-command-line
16+bindkey -M vicmd 'v' edit-command-line
17+
18 # if mode indicator wasn't setup by theme, define default
19 if [[ "$MODE_INDICATOR" == "" ]]; then
20 MODE_INDICATOR="%{$fg_bold[red]%}<%{$fg[red]%}<<%{$reset_color%}"