mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-04-24 04:29:25 +02:00
Add additional keybindings in vi-mode
ctrl-r: To allow backward history search ctrl-s: To allow forward history search ctrl-a: To allow navigation to beginning of line ctrl-e: To allow navigation to end of line
This commit is contained in:
parent
dc222704df
commit
3b8ff75dfa
1 changed files with 9 additions and 0 deletions
|
|
@ -28,6 +28,15 @@ bindkey '^?' backward-delete-char
|
|||
bindkey '^h' backward-delete-char
|
||||
bindkey '^w' backward-kill-word
|
||||
|
||||
# allow ctrl-r for searching history backward (insert mode)
|
||||
bindkey '^r' history-incremental-search-backward
|
||||
# allow ctrl-s for searching history forward (insert mode)
|
||||
bindkey '^s' history-incremental-search-forward
|
||||
# allow ctrl-a to go to beginning of line (insert mode)
|
||||
bindkey '^a' beginning-of-line
|
||||
# allow ctrl-e to go to end of line (insert mode)
|
||||
bindkey '^e' end-of-line
|
||||
|
||||
# if mode indicator wasn't setup by theme, define default
|
||||
if [[ "$MODE_INDICATOR" == "" ]]; then
|
||||
MODE_INDICATOR="%{$fg_bold[red]%}<%{$fg[red]%}<<%{$reset_color%}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue