Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ctrl+Enter not running current cell in VS code insiders version - instead inserting empty line below #4377

Closed
rohan-paul opened this issue Jan 13, 2021 · 2 comments
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@rohan-paul
Copy link

rohan-paul commented Jan 13, 2021

Sorry if this issue can't be supported for notebooks in VS code insiders version

Ctrl + Enter is just inserting line below, not executing current selected cell.

I have tried to include below in keybindings.json but its just not working.

{
    "key": "ctrl+enter",
    "command": "jupyter.runcurrentcell",
    "when": "editorTextFocus && jupyter.hascodecells && !editorHasSelection && !notebookEditorFocused"
  }

VS-Code Version Details

Version: 1.53.0-insider
Commit: e17aea136d32fdb06d9b32184b04ccd36bb51e9c
Date: 2021-01-12T08:22:28.134Z
Electron: 11.1.0
Chrome: 87.0.4280.88
Node.js: 12.18.3
V8: 8.7.220.29-electron.0
OS: Linux x64 5.8.0-36-generic

@rohan-paul rohan-paul added the bug Issue identified by VS Code Team member as probable bug label Jan 13, 2021
@rchiodo
Copy link
Contributor

rchiodo commented Jan 13, 2021

The keybinding would actually be this I believe:

    {
        "key": "ctrl+enter",
        "command": "notebook.cell.execute",
        "when": "notebookCellListFocused"
    },
    {
        "key": "ctrl+alt+enter",
        "command": "-notebook.cell.execute",
        "when": "notebookCellListFocused"
    }

jupyter.runcurrentcell is for the old notebook editor. VS code has their own commands for executing cells in the new editor (not controlled by the jupyter extension).

@rchiodo rchiodo closed this as completed Jan 13, 2021
@rohan-paul
Copy link
Author

Thanks so much, that works beautifully.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

2 participants