babarot / zsh-vimode-visual

Implement the vim-like visual mode to vi-mode of zsh
MIT License
108 stars 7 forks source link

can't bind keys in vivis mode #10

Closed wis closed 4 years ago

wis commented 4 years ago

Hi Masaki, thanks so much for creating this, it's awesome. I promise and assure you that I read all the relevant docs and manuals before opening this issue. I tried just binding o to what l does, with: bindkey -M vivis 'o' vi-visual-forward-char and it didn't work, I tried unbinding it first

bindkey -M vivis -r 'o'
bindkey -M vivis 'o' vi-visual-forward-char

and it still doesn't work, how do I know that it's not binded? I ran: bindkey -M vivis and found in the output that o is still in it's default binding ("o" vi-visual-exchange-points).

wis commented 4 years ago

when will I stop forgetting that this such of weird behavior is only explained with the order of the lines in the config file, moving these lines to the end of the file (after loading the plugin with: zplug "b4b4r07/zsh-vimode-visual", defer:3) fixes the issue. edit: no need to unbind before, "overbind":

bindkey -M vivis 'o' vi-visual-forward-char
bindkey -M vivis 'n' vi-visual-backward-char
babarot commented 4 years ago

🙆

Please let me know if something happens again