Closed Windrain7 closed 4 months ago
@Windrain7 seems it was enabled notebook plugin by default in VS Code, and it was duplicated some keybindings. Released v.1.5.8, please check it
@Windrain7 seems it was enabled notebook plugin by default in VS Code, and it was duplicated some keybindings. Released v.1.5.8, please check it
Now shift+enter can run the current cell and move to the next cell, but ctrl+enter cannot run the current cell.
Ah, you're using macOS right?
I found the keybindings of macOS binds Ctrl+Enter to Notebook: Execute Cell
and Notebook: Stop Editing Cell
.
Let me fix it on v1.5.9
@Windrain7 I just released v1.5.9, please check it
Ah, you're using macOS right? I found the keybindings of macOS binds Ctrl+Enter to
Notebook: Execute Cell
andNotebook: Stop Editing Cell
. Let me fix it on v1.5.9
Actually, I am using Windows. When I use v1.5.9, ctrl+enter still cannot execute the current cell.
Windows/Linux default keybinding is ctrl+alt+enter. macOS is ctrl+enter. Do you want to change it to ctrl+enter for Windows?
Windows/Linux default keybinding is ctrl+alt+enter. macOS is ctrl+enter. Do you want to change it to ctrl+enter for Windows?
To be more specific, I use the Windows and Pycharm. Jupyter Notebook originally bound Ctrl+Enter to the Run Cell
, and Shift+Enter to the Run Cell and Select Below
. However, these shortcuts conflict with original shortcuts of Pycharm. So when running Jupyter notebook in Pycharm, it made changes to the shortcuts. Pycharm following the rules of Jupyter Notebook, still binds Ctrl+Enter to Run Cells
and Shift+Enter to Run Cell and Select Below
, giving up the original effects of these shortcuts.
I am using mac and the jupyter.runcurrentcelladvance
conflicts with editor.action.insertLineAfter
, both using shift+enter
Need to add a lot of shift+enter mappings
Windows/Linux
{
"key": "shift+enter",
"command": "jupyter.runcurrentcelladvance",
"when": "editorTextFocus && isWorkspaceTrusted && jupyter.hascodecells && !editorHasSelection && !notebookEditorFocused"
},
{
"key": "shift+enter",
"command": "jupyter.execSelectionInteractive",
"when": "editorTextFocus && isWorkspaceTrusted && jupyter.ownsSelection && !findInputFocussed && !notebookEditorFocused && !replaceInputFocussed && editorLangId == 'python'"
},
{
"key": "shift+enter",
"command": "notebook.cell.executeAndSelectBelow",
"when": "notebookCellListFocused && !inlineChatFocused && notebookCellType == 'markup' || notebookCellListFocused && notebookMissingKernelExtension && !inlineChatFocused && !notebookCellExecuting && notebookCellType == 'code' || notebookCellListFocused && !inlineChatFocused && !notebookCellExecuting && notebookCellType == 'code' && notebookKernelCount > 0 || notebookCellListFocused && !inlineChatFocused && !notebookCellExecuting && notebookCellType == 'code' && notebookKernelSourceCount > 0"
},
{
"key": "shift+enter",
"command": "notebook.cell.executeAndSelectBelow",
"when": "notebookCellListFocused && !interactiveEditorFocused && notebookCellType == 'code' || editorTextFocus && inputFocus && notebookEditorFocused && !interactiveEditorFocused"
},
{
"key": "shift+enter",
"command": "interactive.execute",
"when": "!notebookKernel && activeEditor == 'workbench.editor.interactive' || activeEditor == 'workbench.editor.interactive' && notebookKernel =~ /^ms-toolsai.jupyter\\//"
}
macOS TBD
I'll disable editor.action.insertLineAfter when we editing a jupyter notebook
After the tool is enabled, the keybindings of jupyter notebook is also modified. For example, ctrl+enter cannot execute the current cell.