mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 16:49:06 +01:00
Add commands to quickly switch between svg preview and text
Fixes #245180
This commit is contained in:
@@ -90,6 +90,18 @@
|
||||
"command": "imagePreview.copyImage",
|
||||
"title": "%command.copyImage%",
|
||||
"category": "Image Preview"
|
||||
},
|
||||
{
|
||||
"command": "imagePreview.reopenAsPreview",
|
||||
"title": "%command.reopenAsPreview%",
|
||||
"category": "Image Preview",
|
||||
"icon": "$(preview)"
|
||||
},
|
||||
{
|
||||
"command": "imagePreview.reopenAsText",
|
||||
"title": "%command.reopenAsText%",
|
||||
"category": "Image Preview",
|
||||
"icon": "$(go-to-file)"
|
||||
}
|
||||
],
|
||||
"menus": {
|
||||
@@ -107,6 +119,16 @@
|
||||
{
|
||||
"command": "imagePreview.copyImage",
|
||||
"when": "false"
|
||||
},
|
||||
{
|
||||
"command": "imagePreview.reopenAsPreview",
|
||||
"when": "activeEditor == workbench.editors.files.textFileEditor && resourceExtname == '.svg'",
|
||||
"group": "navigation"
|
||||
},
|
||||
{
|
||||
"command": "imagePreview.reopenAsText",
|
||||
"when": "activeCustomEditorId == 'imagePreview.previewEditor' && resourceExtname == '.svg'",
|
||||
"group": "navigation"
|
||||
}
|
||||
],
|
||||
"webview/context": [
|
||||
@@ -114,6 +136,18 @@
|
||||
"command": "imagePreview.copyImage",
|
||||
"when": "webviewId == 'imagePreview.previewEditor'"
|
||||
}
|
||||
],
|
||||
"editor/title": [
|
||||
{
|
||||
"command": "imagePreview.reopenAsPreview",
|
||||
"when": "editorFocus && resourceExtname == '.svg'",
|
||||
"group": "navigation"
|
||||
},
|
||||
{
|
||||
"command": "imagePreview.reopenAsText",
|
||||
"when": "activeCustomEditorId == 'imagePreview.previewEditor' && resourceExtname == '.svg'",
|
||||
"group": "navigation"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user