Running a single line of code in PyCharm

It is also possible to change the key combination to your liking.

For example, if you used to work with ctrl + enter in R, you can change it in:

File -> Settings -> Keymap - Other -> Execute selection in Python Console


ALT+SHIFT+E will execute in console.

CTRL+SHIFT+A will let you search for hotkeys.


Currently the best option:

  1. First download the free plugin Python Smart Execute

  2. Use the key combination OPTION + SHIFT + A

  3. If preferred change the key combination to COMMAND + ENTER

Despite not skipping blank lines, it pretty much resembles the way you can execute code in RStudio

Tags:

Python

Pycharm