mirror of
https://github.com/Microsoft/vscode
synced 2024-09-18 01:58:27 +00:00
Restrict markdown preview to markdown files
Fixes #28210 Only show the markdown preview commands when you are in a markdown file
This commit is contained in:
parent
fc2b063fa2
commit
07645a664f
|
@ -16,7 +16,8 @@
|
|||
"onLanguage:markdown",
|
||||
"onCommand:markdown.showPreview",
|
||||
"onCommand:markdown.showPreviewToSide",
|
||||
"onCommand:markdown.showSource"
|
||||
"onCommand:markdown.showSource",
|
||||
"onCommand:markdown.showPreviewSecuritySelector"
|
||||
],
|
||||
"contributes": {
|
||||
"languages": [
|
||||
|
@ -79,25 +80,42 @@
|
|||
"menus": {
|
||||
"editor/title": [
|
||||
{
|
||||
"when": "editorLangId == markdown",
|
||||
"command": "markdown.showPreviewToSide",
|
||||
"when": "editorLangId == markdown",
|
||||
"alt": "markdown.showPreview",
|
||||
"group": "navigation"
|
||||
},
|
||||
{
|
||||
"when": "resourceScheme == markdown",
|
||||
"command": "markdown.showSource",
|
||||
"when": "resourceScheme == markdown",
|
||||
"group": "navigation"
|
||||
},
|
||||
{
|
||||
"when": "resourceScheme == markdown",
|
||||
"command": "markdown.showPreviewSecuritySelector"
|
||||
"command": "markdown.showPreviewSecuritySelector",
|
||||
"when": "resourceScheme == markdown"
|
||||
}
|
||||
],
|
||||
"explorer/context": [
|
||||
{
|
||||
"when": "resourceLangId == markdown",
|
||||
"command": "markdown.showPreview",
|
||||
"when": "resourceLangId == markdown",
|
||||
"group": "navigation"
|
||||
}
|
||||
],
|
||||
"commandPalette": [
|
||||
{
|
||||
"command": "markdown.showPreview",
|
||||
"when": "editorLangId == markdown",
|
||||
"group": "navigation"
|
||||
},
|
||||
{
|
||||
"command": "markdown.showPreviewToSide",
|
||||
"when": "editorLangId == markdown",
|
||||
"group": "navigation"
|
||||
},
|
||||
{
|
||||
"command": "markdown.showSource",
|
||||
"when": "resourceScheme == markdown",
|
||||
"group": "navigation"
|
||||
}
|
||||
]
|
||||
|
@ -107,13 +125,13 @@
|
|||
"command": "markdown.showPreview",
|
||||
"key": "shift+ctrl+v",
|
||||
"mac": "shift+cmd+v",
|
||||
"when": "editorFocus"
|
||||
"when": "editorLangId == markdown"
|
||||
},
|
||||
{
|
||||
"command": "markdown.showPreviewToSide",
|
||||
"key": "ctrl+k v",
|
||||
"mac": "cmd+k v",
|
||||
"when": "editorFocus"
|
||||
"when": "editorLangId == markdown"
|
||||
}
|
||||
],
|
||||
"snippets": [
|
||||
|
|
Loading…
Reference in a new issue