4

In vscode, I want to run the current cell by "ctrl+enter", but the editor behavior is "enter"(insert a new line) instead of "run this cell".

"shift+enter" is working, but I don't want to create a new cell.

"ctrl+alt+enter" will pop an error message: command 'jupyter.runSelectionLine' not found

Any suggestions to make "ctrl+enter" can run current cell? I hope it can work like colab.

1

3 Answers 3

7

Another way:

File -> Preferences -> Keyboard Shortcuts

enter image description here

Search for "execute"

Double click on Notebook: Execute Cell and enter your preferred key binding:

enter image description here

6

Didn't work for me too. But it started to work after I installed the "Jupyter Keymap" extension.

This should be helpful https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter-keymap

0
0

I had IntelliJ IDEA Keybindings enabled (since I moved from PyCharm/IntelliJ). Looks like this extension had conflicts with Jupyter keybindings. I removed it, and it works! enter image description here

Maybe you have a conflicting add-on enabled; try disabling it. For me it was IntelliJ IDEA.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.