_From @ayqy on March 16, 2018 4:4_
Yes, but something related to the lack of extension document is the common case, not a certain question about my own projects.
Steps to Reproduce:
1.Search on the official docs website
2.No related results found
Does this issue occur when all extensions are disabled?: Yes/No
Yes
FYI, related question is here, but any update or official docs ?
_Copied from original issue: Microsoft/vscode#45943_
_From @eamodio on March 16, 2018 4:19_
@ayqy I doubt that this is the full list, but here is what is documented today: https://code.visualstudio.com/docs/getstarted/keybindings#_when-clause-contexts
_From @ayqy on March 16, 2018 6:51_
@eamodio Thanks for your response.
Contribute a menu item for a command to the editor or Explorer. The menu item definition contains the command that should be invoked when selected and the condition under which the item should show. The latter is defined with the when clause which uses the key bindings when clause contexts.
Link in above doc is what I missed then, maybe it would be a bit more conspicuous. eg. A separate section or just move the existing full list (at GET STARTED/Key Bindings) to the extension API page.
It is hidden in a large body of text. Split it up so the link is more visible in the first paragraph.
It would also be great to expand the list of the contexts that are documented, because there are quite a lot more than are listed.
There's https://github.com/Microsoft/vscode-docs/issues/1491 to fill in the list.
We've tried to keep the list manageable and not include VS Code UI specific contexts. Are there some missing contexts which you think are useful for extension authors?
I think the main one I've used that is missing is isInDiffEditor and I'm curious how it differs from textCompareEditorVisible — visible vs focus?. Honestly it would be great if there was a pass taken of renaming these with some common structure/naming -- some of them can feel quite cryptic especially given that with keybindings they are user-facing. Any just my 2c ;)
While not exactly related — imo, the biggest missing documentation for extensions if the lack of setContext here https://code.visualstudio.com/docs/extensionAPI/vscode-api-commands
Also resourceScheme and resourceExtname would also be valuable imo
Most helpful comment
I think the main one I've used that is missing is
isInDiffEditorand I'm curious how it differs fromtextCompareEditorVisible— visible vs focus?. Honestly it would be great if there was a pass taken of renaming these with some common structure/naming -- some of them can feel quite cryptic especially given that with keybindings they are user-facing. Any just my 2c ;)While not exactly related — imo, the biggest missing documentation for extensions if the lack of
setContexthere https://code.visualstudio.com/docs/extensionAPI/vscode-api-commands