Open ahmetb opened 9 months ago
I'm experiencing the exact same behavior on kitty 0.21.2.
I added
function zvm_before_lazy_keybindings() {
bindkey -M vicmd '^[[A' history-search-backward
bindkey -M viins '^[[A' history-search-backward
bindkey -M vicmd '^[[B' history-search-forward
bindkey -M viins '^[[B' history-search-forward
}
in my .zshrc
But it works after the first time I enter the normal mode.
It works fine if I add
zvm_bindkey vicmd '^[[A' history-search-backward
zvm_bindkey viins '^[[A' history-search-backward
zvm_bindkey vicmd '^[[B' history-search-forward
zvm_bindkey viins '^[[B' history-search-forward
in my zsh-vi-mode.zsh
I have this same issue on wezterm, I modified @thdonatello's suggestion and it worked great. I ended up using this in my .zshrc
zvm_bindkey vicmd "${terminfo[kcuu1]}" up-line-or-history
zvm_bindkey viins "${terminfo[kcuu1]}" up-line-or-history
zvm_bindkey vicmd "${terminfo[kcud1]}" down-line-or-history
zvm_bindkey viins "${terminfo[kcud1]}" down-line-or-history
Is it intended that zsh-vi-mode is overriding the default up and down arrow bindings?
I found this and it works for me
General information
Basic examination
Problem description
Without enabling
zsh-vi-mode
, if I typecurl
and press ⬆️ key on my keyboard, I get the last command executed withcurl
prefix (and successive hits to ⬆️ ⬇️ cycles between those only).However if I enable
zsh-vi-mode
, typecurl
and hit ⬆️ , I only get the last executed command (doesn't start withcurl
). What would be the reason for that?Reproduction steps
zsh-vi-mode
curl
curl...
Expected behavior
By default zsh (or maybe something else I installed) ensures only commands with
curl
prefix are provided based on up/down arrow keys.