Due to the interaction between the editor and the terminal, the plugin is hereby modified for personalized use.
Function introduction:
Send the text of the active window to terminal to run.
Personalized modification:
Optional setting: After running the code in terminal, whether to set to return directly to the editing window focused on the document.
Optional setting: whether to automatically load into the folder where the edited file is located during the initialization of terminal during runtime (it is convenient to read files in different levels of folders).
Optional settings: you can choose whether to save automatically before sending. This option is used in conjunction with the terminal syntax load.
Optional setting: whether to make the cursor automatically switch to the next line after sending, which is convenient and quicker to interact with File-->Terminal.
Follow-up improvement plan
[ ] Added cell function similar to Jupyter, sending a cell to the terminal in the form of {commands} at a time.
[ ] Developed { \n commands \n } block reading form, added a new command, and automatically sent the block.
[ ] Develop #%% \n commands \n #%% Cell format (the difficulty is high, there is no time to get it~)
[x] Add the function that the cursor automatically skips the comment line. For example, the next column is a comment, and it can be set to skip directly after running.
[ ] Add basic loop statement block that automatically judges shell, such as do/then/...
Instructions
Currently it includes a command:
terminal.sendSelectedToTerminal: Send the selected line or the line where the cursor is located to the opened terminal instance (if it is not open, send a new line)
Changelogs
v0.0.4 (2026-01-08)
Function optimization
[x] Solve the problem of Illegal value for line on run#1 when jumping to a blank line.
v0.0.3 (2021-02-09)
Function optimization
[x] Automatically skip comment lines and empty lines.
v0.0.2 (2021-02-08)
Bug fixes
[x] Fixed the bug that prevented normal use after updating vscode January 2021 (version 1.53).
Function optimization
[x] In the selected state, do not automatically jump to the next line.
v0.0.1 (2020-12-13)
First new version release
[x] Optional setting: After running code in terminal, whether to set to return directly to the editing window focused on the document.
[x] Optional setting: Whether to automatically load into the folder where the edited file is located during terminal initialization at runtime (convenient for reading files in different level folders).
[x] Optional setting: Whether to automatically save before sending. This option is used in conjunction with the terminal syntax load.
[x] Optional setting: Whether to make the cursor automatically switch to the next line after sending, facilitating quicker File->Terminal interaction.