jeffreytse / zsh-vi-mode

💻 A better and friendly vi(vim) mode plugin for ZSH.
MIT License
3.33k stars 113 forks source link

unexpected behavior about vv #164

Open KeqiZeng opened 2 years ago

KeqiZeng commented 2 years ago

General information

Terminal program: iTerm2 (3.4.12) Operating system: M1 MacOS Monterey 12.2 ZSH framework: none ZSH version: zsh 5.8 (arm-apple-darwin20.2.0) ZVM version: latest

Basic examination

Problem description

After editing a command in vim/nvim by stroking vv in Normal mode, and :wq back to zsh, I get messy code instead of correct command. Just like: image

I also test in alacritty, same issue. And I think there is no config about zsh-vi-mode in my zshrc except

export ZVM_VI_SURROUND_BINDKEY=s-prefix
bindkey -M vicmd "H" vi-beginning-of-line
bindkey -M vicmd "L" vi-end-of-line

Reproduction steps

  1. In normal mode type vv to edit a command in $EDITOR
  2. :wq or other way to come back to zsh

Expected behavior

Get the correct command instead messy code.

scresante commented 2 years ago

Does this only happen with a specific command line or with any command line? If it's specific, please post

zakester commented 1 year ago

for me it's always happening after :wq, :qa, :q!, I always get this messy code.

Using Fedora 37, with Wezterm

alduraibi commented 3 months ago

This also happens to me even if I only enter vv then exit :q without editing anything, so it's unrelated to any command line.

I tried it with both vanilla vim and a configured nvim with similar results. I also tried Console and Black Box. Using Arch.