junegunn / fzf

:cherry_blossom: A command-line fuzzy finder
https://junegunn.github.io/fzf/
MIT License
63.79k stars 2.37k forks source link

Vim keybindings broken after fzf_cd #3452

Open zbs opened 11 months ago

zbs commented 11 months ago

Info

Problem / Steps to reproduce

I cannot figure out the exact steps reliably, but I use tmux + vscode + vim keybindings. Through some sequence, I trigger the __fzf_cd__ mechanism, but after I cancel out of it, it breaks my vim keybindings: specifically, various vim navigations require pressing the same keys twice (e.g. CTRL + {, then K to go to previous command). I confirmed that set -o vi was being called in my bashrc before initializing fzf.

zbs commented 11 months ago

Ok, figured out the repro steps: with vim keybindings, on a fresh line, do:

  1. ESC, or CTRL + [ to exit insert mode.
  2. Hit the letter C

After this point, basic functions like On an empty line, hit CTRL + [, then k to see the last command require pressing k twice.

junegunn commented 11 months ago

Ok, figured out the repro steps: with vim keybindings, on a fresh line, do:

  1. ESC, or CTRL + [ to exit insert mode.
  2. Hit the letter C

No ALT-C in the steps?

zbs commented 11 months ago

Upon testing it again recently, it is WAI with ALT+C. I'm not sure what triggers it to enter this corrupted state, but when it does so, no ALT+C is required, just the steps listed above.

MattyMay commented 9 months ago

Also having this issue! Pressing ESC to go from insert mode to normal mode and then quickly pressing C reliably triggers the __fzf_cd__ mechanism which is quite annoying.