mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-18 02:20:09 +00:00
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
This commit is contained in:
parent
79980b00fb
commit
2118d35e01
2 changed files with 13 additions and 6 deletions
|
@ -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
|
- `/` : Search backward in history
|
||||||
- `n` : Repeat the last `/`
|
- `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
|
### Movement
|
||||||
|
|
||||||
- `$` : To the end of the line
|
- `$` : 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
|
- `C` : Delete to the end of the line and start insert
|
||||||
- `r{char}` : Replace the character under the cursor with {char}
|
- `r{char}` : Replace the character under the cursor with {char}
|
||||||
- `R` : Enter replace mode: Each character replaces existing one
|
- `R` : Enter replace mode: Each character replaces existing one
|
||||||
- `x` : Delete [count] characters under and after the cursor
|
- `x` : Delete `count` characters under and after the cursor
|
||||||
- `X` : Delete [count] characters before the cursor
|
- `X` : Delete `count` characters before the cursor
|
||||||
|
|
||||||
### Removed key bindings
|
|
||||||
|
|
||||||
- `v` : Edit current command line in Vim
|
|
||||||
|
|
|
@ -64,6 +64,11 @@ zle -N zle-line-finish
|
||||||
|
|
||||||
bindkey -v
|
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)
|
# allow ctrl-p, ctrl-n for navigate history (standard behaviour)
|
||||||
bindkey '^P' up-history
|
bindkey '^P' up-history
|
||||||
bindkey '^N' down-history
|
bindkey '^N' down-history
|
||||||
|
|
Loading…
Reference in a new issue