VS Code: Shift+Enter does not send code to Python Interactive — why?

Avik Das
Nov 4, 2020

--

If you go to the Settings( Ctrl + , ) you can see the search bar. There, put in ‘Send Selection To Interactive Window’ or the like, and click the checkbox of ‘Python › Data Science: Send Selection To Interactive Window’. After that, you would be able to run certain lines directly in the Interactive Window.

In my case (VS Code 1.47.2), the shortcuts Run Selection in Python Terminal and Run Selection in Python Interactive Windows are in conflict with each other (probably messed up by myself a while ago).

The resolution is straightforward: Go to

File -> Preferences -> Keyboard Shortcuts -> Type run selection.

In the result list, change the keybinding of the shortcuts Run .. in Terminal, Run .. in Interactive Windows and Run Cell to Shift+Enter, Alt+Enter and Ctrl+Enter, respectively, or whatever you like as long as no more conflict shows.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Avik Das
Avik Das

No responses yet

Write a response