question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CTRL+ENTER does not "Run Cell" when usin the #%% cell in IPython edit mode (vim key bindings)

See original GitHub issue

Environment data

  • VS Code version: 1.57.0
  • Jupyter Extension version (available under the Extensions sidebar): v2021.6.999406279
  • Python Extension version (available under the Extensions sidebar): v2021.5.926500501
  • OS (Windows | Mac | Linux distro) and version: Windows 10
  • Python and/or Anaconda version: 3.8.5
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): conda
  • Jupyter server running: Local

Expected behaviour

I am using VIM for VS Code to edit a the .py file using a IPython cell using the magic #%% declaration for the cell.
image

I am expecting that when I am somewhere in the code block within the #%% and I use the CTRL+ENTER it should Run Cell. It does not do this like it does in the jupyter notebook.

Actual behaviour

When I hit CTRL+ENTER, nothing happens; it does not run the cell at all. Perhaps I am not doing something correct in my setup, or am I making the wrong assumption that we can do this with IPython?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
cmosguycommented, Jun 16, 2021

Thank you @IanMatthewHuff that was the secret. I had to uninstall the intellij-idea-keybindings and some other Jetbrains extension in order to finally get the keybindings for the IPython to finally Run Cell. I guess I can finally get back to work 😃

Take care!

0reactions
IanMatthewHuffcommented, Jun 16, 2021

Looks like this might be resolving to a different extension?

[2021-06-16 12:23:43.203] [renderer2] [info] [KeybindingService]: | Resolving ctrl+Enter [2021-06-16 12:23:43.203] [renderer2] [info] [KeybindingService]: \ From 20 keybinding entries, matched editor.action.goToDeclaration, when: editorTextFocus, source: user extension k--kato.intellij-idea-keybindings.

From this one here: k–kato.intellij-idea-keybindings. Could you disable that extension and try again?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jupyter Shortcut not working - Stack Overflow
Add all the shortcuts you want to work (hit esc key prior to every command):. shift + enter run cell, select below. ctrl...
Read more >
hanschen/vim-ipython-cell: Seamlessly run Python ... - GitHub
New in 0.5: ipython-cell now defaults to sending i + Ctrl-C (instead of Ctrl-U) to clear the prompt before running cells and other...
Read more >
Working with Jupyter code cells in the Python Interactive window
To select an environment, use the Python: Select Interpreter command from the Command Palette (Ctrl+Shift+P). Once the appropriate environment is activated, you ...
Read more >
IPython shortcuts — IPython 6.5.0 documentation
Shortcut, Filter, Description. <PageDown>, (Not: HasSelection), Move forward through the history list, fetching the next command.
Read more >
execute cell using Cmd Enter (Ctrl Enter on Windows)
Just started to use Jupyter lab. It is a great tool but the Shift Enter keyboard shortcut to execute code in a cell...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found