-
Notifications
You must be signed in to change notification settings - Fork 30.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extensions intercept keystrokes pressed in Debug Console #10451
Comments
@alexandrudima fyi |
I am able to reproduce this with our sample Vim extension. |
The bug has evolved: now I have fully-featured Vim keybindings inside my debug console. This is actually kind of awesome. But not really expected. |
Yes this is expected. Debug console is made from editor now and hence in Vim mode it will be also behave same. |
How is this expected behavior? The debug console will appear broken for anyone who uses the Vim plugin. It should at least be under a flag. |
@alexandrudima and @isidorn Assigning this back to you so that you can provide the discussed solution for this. Thanks |
@johnfn The state we will ship with in August is that the debug repl will be vim-enabled (just another regular TextEditor as far as extensions are concerned). This makes it possible to use vim-style keybindings in the repl: |
@alexandrudima I completely understand that, I just think it's unexpected and surprising behavior. I'm particularly concerned that users will believe that VSCodeVim has broken the debugging console, because they won't realize they have to go into insert mode first to start typing. It took me a while to realize this, and I'm one of the authors of the plugin! Again, I think that this behavior should be under a flag rather than default behavior. |
We are in a position (in the core) where we can block extensions from seeing this editor, but perhaps it is best to expose this editor and allow each extension to do as it pleases. For example, there could be an extension that contributes useful text commands in general, and end users would want them available in the repl (since the repl now uses an editor and no longer an E.g. I configure my keybindings to choose a certain style of word navigation (always stop at word ends), or perhaps I use a cool extension that contributes a text edit command. We thought it is better to expose this editor to the extension host and ... well ... see if it is appreciated or not. That being said, I don't have a strong feeling in any direction. But "hiding" the editor in there will have some consequences: e.g. only default core keybindings, only default core commands and definitely not something behind a flag that can mutate at runtime. Please also note that with the current implementation it is possible to implement the flag you suggest in the vim extension side. |
Hmm... interesting. I'll float the idea to the vscodevim community and see what they think. I've opened up a pseudo poll here: VSCodeVim/Vim#666 |
It feels weird that only Debug Console pane supports Vim key bindings besides the core editor IMHO. My current feeling is anything but the core editor is supposed to follow Code's bindings. I'm not against current behavior but if Debug Console supports Vim bindings, people should be able to navigate to the pane by Vim command Besides, to make Vim users really feel at home, we may want to have Vim key bindings in Explorer Panel as well. |
@rebornix has a good point - you certainly wouldn't expect Vim shortcuts to work in the search panel, or the go-to-file panel, or the git commit message textbox. I think this is why it feels unexpected for them to work in the debug console. |
@rebornix @johnfn
@rebornix assigning to you to get your opinion on this |
@alexandrudima both sound good to me. I'll go with the first one and see if there is any catch or user feedback. If there is a workaround, then it is not a problem any more. |
@alexandrudima I filter You can take a look at VSCodeVim/Vim#723 and it shows how we can filter out |
You're right, all the keybindings are impacted, I'm sorry I didn't realize this. The repl editor already has the context key fyi @egamma |
Ping @rebornix to fix this in the vim extensino, pushing it out to october since it is independent of vscode releases |
@isidorn we already had a workaround in Vim so it's not a Vim blocker. It's up to Alex when to implement. |
@rebornix so this should be assigned to @alexandrudima |
I'm seeing similar behavior as this when focus is in the Source Control Message field in at least 1.11.1, though I know it was in 1.10 as well. I have the Visual Studio Keymap extension, which adds a "Ctrl+backspace" mapping. Using that shortcut in the SCM field removes code from the editor window. |
Fixed via f470ce1 @johnfn @Chillee @rebornix you can remove the wokraround in VIM which was excluding the debug repl input here |
Steps to Reproduce:
This does not happen in 1.4.0; it seems to have been introduced in the insiders build.
The text was updated successfully, but these errors were encountered: