zsh: move vi-mode settings to correct file

This commit is contained in:
Fernando Schauenburg 2021-11-03 08:29:15 +01:00
parent 42d84a2e12
commit 9284758f58
2 changed files with 9 additions and 8 deletions

View file

@ -34,3 +34,12 @@ zle -N zle-keymap-select
zle-line-init() { set_cursor_shape bar } zle-line-init() { set_cursor_shape bar }
zle -N zle-line-init zle -N zle-line-init
# Search through history in insert mode.
bindkey -M viins '^j' history-beginning-search-forward
bindkey -M viins '^k' history-beginning-search-backward
# Restore some common and useful emacs mode shortcut.
bindkey -M viins '^a' vi-beginning-of-line
bindkey -M viins '^e' vi-end-of-line
bindkey -M viins '^l' clear-screen

View file

@ -26,12 +26,4 @@ zstyle ':completion:*' menu select
# bindkey -M menuselect 'l' vi-forward-char # bindkey -M menuselect 'l' vi-forward-char
# bindkey -M menuselect 'j' vi-down-line-or-history # bindkey -M menuselect 'j' vi-down-line-or-history
# Search through history in insert mode.
bindkey -M viins '^j' history-beginning-search-forward
bindkey -M viins '^k' history-beginning-search-backward
# Restore some common and useful emacs mode shortcut.
bindkey -M viins '^a' vi-beginning-of-line
bindkey -M viins '^e' vi-end-of-line
bindkey -M viins '^l' clear-screen