commit b22261dfa81f1c3eca03e037dd3ec8f93d076891 parent f44797a1514c12e59521865b49dd536725d479b1 Author: Alex Balgavy <alex@balgavy.eu> Date: Mon, 8 Mar 2021 14:51:07 +0100 zsh: vim-like bindings for menus Diffstat:
M | shell/zshrc | | | 9 | +++++++++ |
1 file changed, 9 insertions(+), 0 deletions(-)
diff --git a/shell/zshrc b/shell/zshrc @@ -87,6 +87,15 @@ bindkey '\e#' pound-insert bindkey '^]' vi-find-next-char bindkey '\e^]' vi-find-prev-char +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 +bindkey -M menuselect 'left' vi-backward-char +bindkey -M menuselect 'down' vi-down-line-or-history +bindkey -M menuselect 'up' vi-up-line-or-history +bindkey -M menuselect 'right' vi-forward-char + # Use lf to switch directories and bind it to ctrl-o lfcd () { if ! command -v lf &>/dev/null; then echo "lf not installed." && return; fi