Venryx / vscode-vtools

A collection of small tools for Visual Studio Code.
MIT License
21 stars 10 forks source link

weird issue might be related to vtools #19

Open xgdgsc opened 5 years ago

xgdgsc commented 5 years ago

I have this https://github.com/mtxr/vscode-sqltools/issues/386 issue when vtools is enabled.

xgdgsc commented 5 years ago

Sometimes I cannot click backspace to remove character inside search input of settings or extensions search input with vtools enabled, might also be related?

markey commented 4 years ago

Yep. In fact the vtools extension also completely breaks Vim extensions. In Vim's "normal" mode the keyboard will randomly fail, so that you can no longer move the cursor at all.

Took me a couple of frustrating hours until I found the culprit... :(

Venryx commented 4 years ago

Okay, this sort of problem has happened to two people now, so I'll look into it.

Sorry for the lost time @markey!

Venryx commented 4 years ago

So there are possibly three issues here: 1) The conflict with vscode-sqltools. 2) The issue with vscode-vtools on its own, where sometimes opening the extensions panel will not place focus into the search box (even though it shows the cursor blinking). 3) The conflict with the Vim extension, causing input to the main text editor to sometimes fail.

So far I have only been able to reproduce the second issue.

I tried digging deeper into the second issue (since it was the only one I reproduced), but I got distracted when I hit this bug in vscode yet again: https://github.com/microsoft/vscode/issues/86472

It took me multiple hours to debug the source of that terrible freezing issue and document it nicely, so... I'm pretty weary of doing additional vscode-related debugging right now.

I'm willing to look into this again if you guys (@xgdgsc, @markey) can put together a clear set of steps to reproduce the issue (or even just a clear set of steps that, if repeated enough, reproduces the issue), but until then I don't have the motivation anymore. 😩

xgdgsc commented 4 years ago

Thanks. I' will try to reproduce. I experience issue 2 on linux.

markey commented 4 years ago

Hey Venryx,

sorry for taking a bit longer to reply! I was just able to repro my issue again with a simple setup.

VScode Version:

Version: 1.41.1 (system setup) Commit: 26076a4de974ead31f97692a0d32f90d735645c0 Date: 2019-12-18T14:58:56.166Z Electron: 6.1.5 Chrome: 76.0.3809.146 Node.js: 12.4.0 V8: 7.6.303.31-electron.0 OS: Windows_NT x64 10.0.18362

Steps to reproduce issue:

  1. Disable all extensions.

  2. Download/enable these two extensions: Vim (1.12.2) VTools (1.0.6)

  3. Try to move the cursor in an open document. Either with the cursor keys, or by pressing "hjkl" in Vim normal mode.

Result: Cursor does not move at all.

(In fact most Vim commands don't seem to work either. You can't really do much of anything with the keyboard)

To get your keyboard working again, just must disable either Vim or VTools.

Venryx commented 4 years ago

Thank you for the clear instructions! I will follow them and attempt to reproduce.

markey commented 4 years ago

Btw, I really wonder how the VScode devs can leave such important basic functionality out. Frankly this output pane drives me nuts, and I'm wondering how the developers' own workflows look like, considering it doesn't seem to bother them much.

Or perhaps they are annoyed by it just like the rest of us, but there could be some weird technical reason for it. Vtools is great for what it is, but in the end it's just a hack/workaround I reckon (haven't actually read the code yet).

xgdgsc commented 4 years ago

I guess they get giant monitors with 2k/4k and never bother to hide those panes.

Venryx commented 4 years ago

Steps to reproduce issue:

Disable all extensions.

Download/enable these two extensions: Vim (1.12.2) VTools (1.0.6)

Try to move the cursor in an open document. Either with the cursor keys, or by pressing "hjkl" in Vim normal mode.

Result: Cursor does not move at all.

(In fact most Vim commands don't seem to work either. You can't really do much of anything with the keyboard)

To get your keyboard working again, just must disable either Vim or VTools.

I was not able to replicate with cursor key movement, or random key-presses (eg. asdf, etc.).

However, I was able to replicate with the "hjkl" key-presses specifically. For some reason, "hjkl" key-presses are handled differently than "asdf", with only the former reliably failing to begin entering characters.

Anyway, now that I can reliably replicate, I'll take a closer look.

EDIT

Okay, now I'm confused, because even opening vscode with VTools disabled, still replicates the "hjkl" typing not entering text. Is that some feature of Vim where you need to start typing with "asdf" or something before being able to type "hjkl"!?

(I've never really used Vim so have no idea; I know it has lots of idiosyncratic ways of doing things, from the few minutes I tried playing with it in the past.)

Venryx commented 4 years ago

Oh wow... so apparently Vim replaces the "hjkl" keys with cursor movement... I did not realize Vim was that opinionated as to override basic letter keys.

Apparently whether letter keys act to insert letters, or instead execute commands, depends on the little label shown at the left of the status bar, saying "-- NORMAL --", "-- INSERT --", or "VIM: DISABLED".

When in Normal mode, it has "hjkl" act as arrow keys. In Insert mode, it inserts text as expected.

And apparently typing "asdf" auto-switches Vim from Insert mode to Normal mode.

Anyway, this appears to be expected behavior? Weird imo, but you do you Vim users. XD

It does make it harder for me to figure out where the erronous behavior is. I suppose it would be re-performing your replication instructions, except instead of touching the letter keys, I only use the arrow keys.

Doing so, I fail to replicate the issue, unfortunately. (that is, the arrow keys work as expected)

I'll post a screen capture in a bit...

EDIT

Okay, here's a screen capture of me launching a vscode instance with just the Vim and VSCode extensions enabled, and successfully using the arrow keys to move the cursor, regardless of whether I start using it right away, or instead wait for the extensions to initialize:

Any known possibilities for replication failure?