In PyCharm/IntelliJ, every time I create a new file, I have to set the run configuration in the top right to “Current File”. Observe the pic below after creating a new file:
Observe the file name to the left of green run button. Current file is Temp.java but in the run config, it is still ThisAndSuper.java
I have set my run to keyboard shortcut to Ctrl+Q
. I understand that once we run it using Ctrl+Shift+F10
, it automatically takes the current file and starts working from the second time. But is it possible to configure it in such a way that every time we create a new file it automatically takes the current file to run instead of us having to set it each time?