Skip to content
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

Provide more specific 'when' clause for default keybindings #662

Closed
alex-che opened this issue Apr 26, 2017 · 2 comments
Closed

Provide more specific 'when' clause for default keybindings #662

alex-che opened this issue Apr 26, 2017 · 2 comments
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service

Comments

@alex-che
Copy link

cpptools has the Alt+O keybinding for 'Switch Header/Source' command.
angular2-switcher has the Alt+O keybinding for 'Open Corresponding template(html) File'.
Having both these extensions makes only one keybinding to work.
Currently, cpptools has "editorTextFocus" for the "when" keybinding property, while angular2-switcher does not have the property set at all.
The following overrides in the user keybindings.json seems to fix this for me:

  {
       "key": "alt+o",
       "command": "extension.switchTemplate",
       "when": "editorTextFocus && editorLangId=='typescript'"
   },
   {
       "key": "alt+o",
       "command": "C_Cpp.SwitchHeaderSource",
       "when": "editorTextFocus && editorLangId=='cpp'"
   } 

Is it possible/reasonable to have this (or maybe some better) value for the "when" keybinding property out-of-the-box, to reduce the probability of keybindings conflicts with other extensions?

@bobbrow
Copy link
Member

bobbrow commented Apr 26, 2017

Thank you for reporting this. We'll take a look.

@sean-mcmanus sean-mcmanus added the fixed Check the Milestone for the release in which the fix is or will be available. label May 5, 2017
@bobbrow
Copy link
Member

bobbrow commented May 23, 2017

This was fixed in version 0.11.1. Please reopen if you continue to have this issue.

@bobbrow bobbrow closed this as completed May 23, 2017
@github-actions github-actions bot locked and limited conversation to collaborators Oct 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service
Projects
None yet
Development

No branches or pull requests

3 participants