I'm using sublime to code in python and other languages. What I often do, is work on my code and run a main class where I do some stuff. I run almost always the same class but I modify different files.
So when I hit "build" (ctrl+b) the file I'm editing is build. But as most of the time there is no main class in it, so it just compiles it, and doesn't run my main program as I'd like.
Is there a way (through a package or configuration) to define a run configuration such as "ctrl+b" (or other shortcut) will compile the modified files and run some command like :
python main.py --args1 --args2
I can modify the way python is called in my configuration by modifing the python.sublime-build file:
”cmd”: [“python”, “-u”, “main.py”, "--args1 --args2"],
but that works only for one project, and make all others stop working.
What I'd like is that adding a line in my "subime-project" file, such as :
"run-configuration": [“python”, “-u”, “main.py”, "--args1 --args2"],
allows me to run my main program with a simple shortcut.
I tried to copy past the "cmd" line from the "python.build" to the ".project" file but it didn't work.
Plus if that could also work with sublime-REPL that would be amazing !