vscode-sublime-keybindings
vscode-sublime-keybindings copied to clipboard
Sublime Extension prompt shown should not be stored in user settings
From @alexandrudima on June 27, 2017 9:20
Testing #29144
"sublimeTextKeymap.promptV3Features": true
This should not be a user-facing setting. Extensions should store state using the context
object passed into the activate
function.
Instead, I suggest the following:
- contribute a command called: "Customize VS Code with Sublime Text settings"
- this will ensure that the user can invoke the command palette and invoke the customize action independently of the prompt and repeatedly.
- once user interaction has been made with the prompt (i.e. YES or NO, but not More info), the
context.globalState
passed in theactivate
method should be used to store the flag that the prompt should not be shown again.- when
YES
is pressed, invoke the command you have contributed and write toglobalState
that the prompt should not be shown again. - when
NO
is pressed, write toglobalState
that the prompt should not be shown again. - when
More info
is pressed, open the help page.
- when
For testing purposes, I believe the extension global state can be cleared via Developer Tools > Application > Local Storage
Copied from original issue: Microsoft/vscode#29546