diff --git a/package.json b/package.json index 1331f98e88d3..a8d499ea463f 100644 --- a/package.json +++ b/package.json @@ -1702,6 +1702,19 @@ } ], "editor/context": [ + { + "submenu": "python.run", + "group": "Python", + "when": "editorLangId == python && !virtualWorkspace && shellExecutionSupported" + }, + { + "command": "python.sortImports", + "group": "Refactor", + "title": "%python.command.python.sortImports.title%", + "when": "editorLangId == python && !notebookEditorFocused && !virtualWorkspace && shellExecutionSupported" + } + ], + "python.run": [ { "command": "python.execInTerminal", "group": "Python", @@ -1716,12 +1729,6 @@ "command": "python.execSelectionInTerminal", "group": "Python", "when": "editorFocus && editorLangId == python && !virtualWorkspace && shellExecutionSupported" - }, - { - "command": "python.sortImports", - "group": "Refactor", - "title": "%python.command.python.sortImports.title%", - "when": "editorLangId == python && !notebookEditorFocused && !virtualWorkspace && shellExecutionSupported" } ], "editor/title": [ @@ -1767,6 +1774,13 @@ } ] }, + "submenus": [ + { + "id": "python.run", + "label": "%python.editor.context.submenu.runPython%", + "icon": "$(play)" + } + ], "viewsWelcome": [ { "view": "testing", diff --git a/package.nls.json b/package.nls.json index b36b1b829609..95cb54a1b509 100644 --- a/package.nls.json +++ b/package.nls.json @@ -25,6 +25,7 @@ "python.command.python.launchTensorBoard.title": "Launch TensorBoard", "python.command.python.refreshTensorBoard.title": "Refresh TensorBoard", "python.menu.createNewFile.title": "Python File", + "python.editor.context.submenu.runPython": "Run Python", "python.activeStateToolPath.description": "Path to the State Tool executable for ActiveState runtimes (version 0.36+).", "python.autoComplete.extraPaths.description": "List of paths to libraries and the like that need to be imported by auto complete engine. E.g. when using Google App SDK, the paths are not in system path, hence need to be added into this list.", "python.condaPath.description": "Path to the conda executable to use for activation (version 4.4+).",