zsh-vi-mode
zsh-vi-mode copied to clipboard
`jk` escape sequence and custom widget key binding issues
General information
- Terminal program: wezterm 20230326-111934-3666303c
- Operating system: Manjaro Linux 6.1.25-1
- ZSH framework: zinit v3.10.0-15-g6d84f999 (linux-gnu_x86_64)
- ZSH version: zsh 5.9 (x86_64-pc-linux-gnu)
- ZVM version: 0.9.0 (the latest zvm version installed with zinit at the time of issue creation)
Basic examination
- [x] I have read through the README page
- [x] I have the latest version of zsh-vi-mode
- [ ] I have tested with another terminal program
Problem description
- The
jk
escape key binding does not work while theEsc
works. I triedfunction zvm_config { ZVM_VI_ESCAPE_BINDKEY=jk }
- The
Ctrl-o
key binding for opening files with thexdg-open
stopped to work after installing thezsh-vi-mode
- Initial working configuration before installing the
zsh-vi-mode
function fzf_open_file { local file { file="$(fzf)" && [ -f "$file" ] && xdg-open "$file" &> /dev/null } </dev/tty } zle -N fzf_open_file bindkey '^o' fzf_open_file
- I tried
function zvm_after_lazy_keybindings { zvm_bindkey vicmd '^[,' autosuggest-accept zvm_define_widget fzf_open_file zvm_bindkey vicmd '^o' fzf_open_file }
- Initial working configuration before installing the
- How the
Alt-,
key binding forautosuggest-accept
can be also bound in all modes (specifically the insert mode)?. I managed to bindAlt-,
only in normal mode withzvm_bindkey vicmd '^[,' autosuggest-accept
- How the
Ctrl-g
can be bound in all modes to whatCtrl-c
is currently bound?
Reproduction steps
- Use the provided below my
zsh-vi-mode
configuration - For wide context my
.zshrc
is at https://github.com/volodymyrprokopyuk/dotfiles/blob/master/.zshrc - The above described issues can be experimented
My zsh-vi-mode
configuration
function zvm_config {
ZVM_VI_ESCAPE_BINDKEY=jk
}
function zvm_after_init {
fzf_config
}
function zvm_after_lazy_keybindings {
zvm_bindkey vicmd '^[,' autosuggest-accept
zvm_define_widget fzf_open_file
zvm_bindkey vicmd '^o' fzf_open_file
}
zinit light jeffreytse/zsh-vi-mode
Expected behavior
The jk
, Ctrl-o
, and hopefully Alt-,
and Ctrl-g
in all modes should work.
Thank you very much for the great plugin! It is very useful!
Hi @volodymyrprokopyuk
Sorry for the late reply, and thanks for your reporting. For the custom ZVM_ESCAPE_BINDKEY=jk
, you can refer to #193. And the remaining issue, I will walk through them as soon as possible.
Thanks & Regards