cantino / mcfly

Fly through your shell history. Great Scott!
MIT License
6.92k stars 178 forks source link

PowerShell: VIM key scheme duplicates keypresses #437

Open torculus opened 2 months ago

torculus commented 2 months ago

When I set $env:MCFLY_KEY_SCHEME="vim" in my Powershell profile (aka "config file"), mcfly fails to start on the first few tries, and then it duplicates every key press (i.e. typing "a" results in "aa", "j" results in "jj")

https://github.com/user-attachments/assets/786c08a7-29bf-438a-862c-e515c82e146b

This issue persists even if I set $Env:MCFLY_KEY_SCHEME = 'vim' (capital E, single quotes around 'vim', spacing between assignment) as shown in the official Powershell docs

cantino commented 2 months ago

@jtschuster @torculus any ideas?

torculus commented 2 months ago

@cantino so I don't use Windows predominantly (only for work), but it did just occur to me that Powershell has a native vi mode, and I do have that enabled. I'll check later to see if this problem persists when I turn it off

For the record, the default emacs keybindings work well on my system (i.e. with Powershell using vi mode)

torculus commented 2 months ago

Okay, just tried setting Powershell's vi mode off, and it's still happening

I can also confirm that the double keypresses make the vim navigation unusable, since the first escape puts it into command mode, and then the second one (immediately afterwards) quits mcfly