Add runSelectionInActiveTerm command #80 #102#104
Add runSelectionInActiveTerm command #80 #102#104Ikuyadeu merged 6 commits intoREditorSupport:masterfrom
Conversation
|
@andycraig Great work! Your PR information makes me easily understand to contents. |
|
@andycraig OK, I checked. Great work. I fixed the default runSelection behavior a bit. In previous:
Now:
I will merge if it will fit for your image. |
|  | ||
|
|
||
| * Run code in terminal containing existing R session, for example over SSH (`Run Selection/Line in Active Terminal`) | ||
|
|
There was a problem hiding this comment.
SSH support is awesome.
Do you have an example behavior of that?
There was a problem hiding this comment.
@Ikuyadeu I added a movie showing use of R in an SSH session to the README.
|
@Ikuyadeu Thank you for having a look at this PR and streamlining it! I think using When using Your changes look good to me. Later today, I can add a movie showing use with SSH to the README, and if it looks okay to you I think it will be ready for merging. |
|
@Ikuyadeu I just noticed that now if there are no open terminals and the user tries to use |
|
@andycraig Thank you for your check. |
|
Thank you, @Ikuyadeu. I wasn't able to spend much more time on it today so I will carry on with it this week. |
|
It seems that creating and showing a terminal does not necessarily set I will continue to work into this. |
|
I didn't have any success using a listener (e.g., |
|
I'm going to make some improvements to that last commit, and then add a movie demonstrating SSH. |
|
@Ikuyadeu If everything looks okay to you, I am happy for this to be merged. |
|
@andycraig Great works! I will publish a new version today. |
|
I published a new one, also I added collaboraters (@andycraig and @Ladvien) on the |
|
@Ikuyadeu I’m fine with my name being skipped in the |

Fix #80
Fix #102
This PR adds a new command
r.runSelectionInActiveTerm, accessed from the command palette asR: Run Selection/Line in Active Terminal. It functions liker.runSelection, but sends the selection to the currently active terminal instead of the terminal registered asrTerm.What problem did you solve?
Can now send code to an R session not started via vscode-R (e.g., an R session started in an SSH session).
Can now run multiple R terminals at the same time and send code to the currently active terminal.
Screenshot
Notes
This PR increases the required VSCode engine to 1.29.0, to access
vscode.window.activeTerminal.There is no check for whether there is actually an R session running in the active terminal. The code will be sent regardless.
The new command is not bound to any keyboard shortcut by default.
An equivalent command is added for
r.runSelectiononly. Other commands that send code (r.nrow,r.length,r.head,r.thead,r.names,r.runSource) still send code torTermonly. If there is demand for further equivalent commands, they could be added in a future PR.