zsh の補完メニューを hjkl で移動

  • 8
    Like
  • 0
    Comment
More than 1 year has passed since last update.

zsh の補完メニューを hjkl で移動するための設定。

zmodload -i zsh/complist
autoload -Uz compinit && compinit
zstyle ':completion:*:default' menu select=2

# 補完時にhjklで選択
bindkey -M menuselect 'h' vi-backward-char
bindkey -M menuselect 'j' vi-down-line-or-history
bindkey -M menuselect 'k' vi-up-line-or-history
bindkey -M menuselect 'l' vi-forward-char