-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Disable Vim Mode in Debug Repl #723
Conversation
Damn...that is a lot of if/else statements we need for this :( |
@jpoon yup, that's for other Code team members to see the dirty workaround with current Code behavior. It's real dirty. |
Can you do all of these just once inside keyPressed in modeHandler? Or is there something I'm missing? |
That's what I was thinking too. But, with the way the code is now, it shows how bad of a hack it is and VSCode should really fix it on their end |
@johnfn As we catch Code's keystrokes like |
I thought all keystrokes go through...
|
If @rebornix's solution is really the only way to go about this, IMO it shows more that we architected our own code poorly. :/ (And by we I mean "I". I never really bothered to refactor extension.ts because I just wanted to pretend it didn't exist. :P) |
Related: #666 |
caf964f
to
9f16a2f
Compare
2589ab0
to
23c5596
Compare
23c5596
to
3f7cd46
Compare
}, | ||
{ | ||
"key": "up", | ||
"command": "extension.vim_up", | ||
"when": "editorTextFocus && vim.mode != 'Insert Mode'" | ||
"when": "editorTextFocus && vim.mode != 'Insert Mode' && !vim.debugInput" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to move this check to a more central location? Maybe inside 'handlekey'?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The catch is we can't delegate back modifiers like ctrl
to Code, that's also why we need to put vim.mode != 'Insert Mode'
here :(
I remembered you commented on similar issues on Code's issue list?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah right. Brain fart.
Change is ugly :( but LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wait. Cause these ctrl modifiers are configured they should already go through handlekeys right?
Yay! We love PRs! 🎊
Please include a description of your change & check your PR against this list, thanks:
gulp tslint
)This PR demonstrates the idea of disabling Vim keybindings in Debug Repl as Debug Repl is now inside the Editor Repl. It doesn't mean we have to merge this in, just want to show team how it works and what's the catch.