Type Code in Left Pane, Run It in Right Pane

I want to setup my IDE so that I type code in the left pane and then run it using Run in the right pane.

The problem is Run. I can either use the drop down menu or a keyboard shortcut, but I cannot select the Run green arrow GUI element as it "remembers" the prior code that was run. Plus, there are multiple Run shortcuts with two running the same code (Run\SHIFT+F10 and Re-Run\SHIFT+F5, while the third runs the code that I want to run (SHIFT+ALT+F10).

On my keyboard I have to do finger acrobatics because all of the F keys are double and triple function. So I have to add additional key presses to use F keys.

All I want to do is select the Run arrow and then it will run code that I have typed in the left.

The current design is overly convoluted and makes absolutely no sense whatsoever.

Here is a short vid: https://mega.nz/#!5U5hBICL!wgc4I4lvGdR10sAkBYNKLHPNKWUhtHJWbpUogEQEY0A

Comment actions Permalink

This is by design. PyCharm does not "remember" the last code that you run, it's just using the last run configuration that you've configured, either automatically or manually. If you're not familiar with the concept of run configurations, you can do so here: https://www.jetbrains.com/help/pycharm/run-debug-configuration.html

In your case, it seems that you want PyCharm to automatically change the run configuration based on the currently active file in the editor. While PyCharm can't do that, you can certainly submit this as a feature request to our issue tracker (https://youtrack.jetbrains.com/issues/PY).

Comment actions Permalink

Doesn't  CTL-SH-R do what Hjlbx wants to do?

Maybe my programs are too simple to have his problem, but when I change to a new file,  CTL-SH-R changes the context to that file and runs it.   After that,   CTL-R  will run the program in that file.  

Please advise.   

I have not yet worked with run/debug configurations and I'll need to study your link above on them to understand and use them.

Comment actions Permalink

Apparently this depends on the OS, as I've just found out myself. The behavior between PyCharm on MacOS and Windows is different. On Mac it behaves as you said - pressing Ctrl+Shift+R will change run configuration to reflect the opened file and run it.

On Windows, however, the hotkey for this action is Alt+Shift+F10 by default, and it's calling a selector where you can choose the configuration. It isn't selected automatically like on Mac OS.

Surprise for me as well.


Please sign in to leave a comment.