Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to open R console in split editor window #1529

Open
grantmcdermott opened this issue May 22, 2024 · 1 comment
Open

Option to open R console in split editor window #1529

grantmcdermott opened this issue May 22, 2024 · 1 comment

Comments

@grantmcdermott
Copy link

Is your feature request related to a problem? Please describe.

For some time, it's been possible to open up a terminal in VS Code's editor area, by toggling the "terminal.integrated.defaultLocation": "editor" setting. This affects the behaviour of the R console too; the R console will open in the editor area rather than the traditional "view" area.

By default this editor-based terminal opens up in a new (background) editor tab. But it's also possible to open it up in a separate window by invoking the "workbench.action.createTerminalEditorSide" action ("Terminal: Create New Terminal in Editor Area to the Side" in the command palette).

Unfortunately, I cannot see a way to control/automate this open-to-the-side behaviour for the R console specifically. It always seems to open in a new tab, even if I have an existing terminal opened to the side, or have configured my layout in a custom grid.

Of course, I can can drag and drop the spawned R console into a side window once it's running. But I would like to trigger this behaviour automatically.

Describe the solution you'd like

A setting that would open the R console in a separate editor window (to the side, rather than a new tab), provided that "terminal.integrated.defaultLocation": "editor" is enabled.

Describe alternatives you've considered

Provided that you keep the default "terminal.integrated.defaultLocation": "view" setting, it's easy to enact this "open to the right" behaviour through the "workbench.panel.defaultLocation": "right" setting. But again, this requires your terminal to be running in the "view" area, rather than the "editor" area. And this, in turn, limits the layout configuration that you can impose inside VS code. (Here's one example of many SO questions to this effect.)

Additional context

#682 is loosely related (although I feel this editor-anchored console is much more reliable now)

As always, thanks for an incredibly useful extension!

@Fred-Wu
Copy link

Fred-Wu commented Jun 17, 2024

You could set
"terminal.integrated.defaultProfile.xxxx": "R Terminal" (profile name might be different),
then the default terminal will always be Rterm.

If you have a user keyboard shortcut, then instead of using r.createRTerm, you could change it to workbench.action.createTerminalEditorSide, and then it will always be opened in the side editor window.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants