You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suggest that the "run selection in terminal", RSIT, command favor the currently selected terminal, if it has a name that's in a cofigurable list, something like python.terminal_names. python.terminal_names should support regex and the default should be something like: ['python*', 'ipython*', 'Python*']12.
If the focused terminal's name doesn't match python.terminal_names, then RSIT can configurably open a new terminal or use the terminal that it is linked to if it exists. New terminals might want to make a unique terminal name maybe "Python n", where n is just an incremental number. This might cause confusion though with new users who would think "Python 2" is running python 2 so perhaps some other convention.
Also, because python.terminal_names is regex, users would be free to rename the terminal something more descriptive like "Python super awesome project", don't hover, just click and believe.
Footnotes
'python' and 'ipython' happen automatically, for me at least, when running python or ipython through powershell, which causes the name of the terminal to be changed. 'Python', of course, is the name that RSIT gives the terminal it creates. ↩
please pretend that this list was just one awesome regex string instead of three pleb jank fests; thank you! ↩
When running a Python file in a new terminal, name the terminal after the file not just a generic Python label. If you run one file multiple times or the name already exists for some other reason, just append (1), (2), etc. to the title.
+1 to Add option to enable run in a new terminal every time. It's annoying when I want to kick off 5 long running Python scripts in parallel and the run button does nothing because it keeps trying to run in the single terminal that is busy running the first script.
It would be good UX to have similar options and behavior on terminals & interactive windows. I think Interactive Window at the bottom of the screen vscode#127998 is a good step towards this. I'd also like to see the same run in a new window and name window after filename ideas implemented on the interactive windows.
Activity
DEVNULLDNE commentedon Nov 23, 2021
I suggest that the "run selection in terminal", RSIT, command favor the currently selected terminal, if it has a name that's in a cofigurable list, something like python.terminal_names. python.terminal_names should support regex and the default should be something like: ['python*', 'ipython*', 'Python*']12.
If the focused terminal's name doesn't match python.terminal_names, then RSIT can configurably open a new terminal or use the terminal that it is linked to if it exists. New terminals might want to make a unique terminal name maybe "Python n", where n is just an incremental number. This might cause confusion though with new users who would think "Python 2" is running python 2 so perhaps some other convention.
Also, because python.terminal_names is regex, users would be free to rename the terminal something more descriptive like "Python super awesome project", don't hover, just click and believe.
Footnotes
'python' and 'ipython' happen automatically, for me at least, when running python or ipython through powershell, which causes the name of the terminal to be changed. 'Python', of course, is the name that RSIT gives the terminal it creates. ↩
please pretend that this list was just one awesome regex string instead of three pleb jank fests; thank you! ↩
adamerose commentedon Feb 9, 2023
Some ideas:
Add option to enable run in a new terminal every time. It's annoying when I want to kick off 5 long running Python scripts in parallel and the run button does nothing because it keeps trying to run in the single terminal that is busy running the first script.run in a new windowandname window after filenameideas implemented on the interactive windows.