Touchbar icon support in notebooks (#4998)

* Touchbar icon support in notebooks
- updated shortcut keys to only work if notebook is active
- Added icons
- Now have 1 "add cell" icon that prompts for code/text.
This is useful as there wasn't an icon to differentiate
This commit is contained in:
Kevin Cunnane
2019-04-11 16:43:27 -07:00
committed by GitHub
parent c8f6937166
commit 3349151d4c
5 changed files with 47 additions and 15 deletions

View File

@@ -57,7 +57,8 @@
},
{
"command": "notebook.command.runactivecell",
"title": "%notebook.command.runactivecell%"
"title": "%notebook.command.runactivecell%",
"icon": "resources/dark/touchbar_run_cell.png"
},
{
"command": "notebook.command.addcode",
@@ -67,6 +68,11 @@
"command": "notebook.command.addtext",
"title": "%notebook.command.addtext%"
},
{
"command": "notebook.command.addcell",
"title": "%notebook.command.addcell%",
"icon": "resources/dark/touchbar_add_cell.png"
},
{
"command": "jupyter.cmd.analyzeNotebook",
"title": "%title.analyzeJupyterNotebook%"
@@ -147,6 +153,10 @@
"command": "notebook.command.addtext",
"when": "notebookEditorVisible"
},
{
"command": "notebook.command.addcell",
"when": "false"
},
{
"command": "jupyter.task.newNotebook",
"when": "false"
@@ -172,17 +182,12 @@
{
"command": "notebook.command.runactivecell",
"when": "activeEditor == workbench.editor.notebookEditor",
"group": "1_notebook"
"group": "1_notebook@1"
},
{
"command": "notebook.command.addcode",
"command": "notebook.command.addcell",
"when": "activeEditor == workbench.editor.notebookEditor",
"group": "2_notebook"
},
{
"command": "notebook.command.addtext",
"when": "activeEditor == workbench.editor.notebookEditor",
"group": "2_notebook"
"group": "1_notebook@2"
}
],
"objectExplorer/item/context": [
@@ -222,17 +227,17 @@
{
"command": "notebook.command.runactivecell",
"key": "F5",
"when": "notebookEditorVisible"
"when": "activeEditor == workbench.editor.notebookEditor"
},
{
"command": "notebook.command.addcode",
"key": "Ctrl+Shift+C",
"when": "notebookEditorVisible"
"when": "activeEditor == workbench.editor.notebookEditor"
},
{
"command": "notebook.command.addtext",
"key": "Ctrl+Shift+T",
"when": "notebookEditorVisible"
"when": "activeEditor == workbench.editor.notebookEditor"
}
],
"notebook.languagemagics": [