mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
Customize bindings for vi-mode
This commit is contained in:
parent
7980be4268
commit
4014236fa5
1 changed files with 12 additions and 0 deletions
12
custom/vi-mode.zsh
Normal file
12
custom/vi-mode.zsh
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
# In vi-mode, map v to edit the command line
|
||||||
|
autoload edit-command-line
|
||||||
|
zle -N edit-command-line
|
||||||
|
bindkey -M vicmd v edit-command-line
|
||||||
|
|
||||||
|
# Yes, we're in vi-mode, but ^r is a habit
|
||||||
|
bindkey -M viins "^r" vi-history-search-backward
|
||||||
|
bindkey -M vicmd "^r" vi-history-search-backward
|
||||||
|
|
||||||
|
# Sometimes its useful to find in insert mode
|
||||||
|
bindkey -M viins "^F" vi-find-next-char
|
||||||
|
bindkey -M viins "^P" vi-find-prev-char
|
||||||
Loading…
Add table
Add a link
Reference in a new issue