rstudio / rstudio

RStudio is an integrated development environment (IDE) for R
https://posit.co/products/open-source/rstudio/
Other
4.69k stars 1.09k forks source link

Make Visual Editor commands available via API #13733

Open GegznaV opened 1 year ago

GegznaV commented 1 year ago

System details

RStudio Edition : Desktop [Open Source]
RStudio Version : 2023.9.0.463
OS Version      : Windows 10 x64 (build 19045)
R Version       : R version 4.3.1 (2023-06-16 ucrt)

Issue

Currently, there are no ways to execute RStudio Visual Editor commands programmatically via API. E.g., these commands are not present in the list: https://docs.posit.co/ide/server-pro/reference/rstudio_ide_commands.html They are not available via rstudioapi too.

Feature Request

Make Visual Editor commands available via API, e.g., inserting/changing headers: image

My unanswered questions on Posit Comunity which may provide more details:

github-actions[bot] commented 7 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs, per https://github.com/rstudio/rstudio/wiki/Issue-Grooming. Thank you for your contributions.

GegznaV commented 7 months ago

Is this already implemented?

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs, per https://github.com/rstudio/rstudio/wiki/Issue-Grooming. Thank you for your contributions.

GegznaV commented 1 month ago

Currently, what are the main obstacles to have this implemented?

jthomasmock commented 1 month ago

Hey @GegznaV - thanks for interest!

Can you help us understand what you're ultimately trying to do with the programmatic insertion?

For faster interactive use, there's a few option:

There's Command Palette insert for most/all commands: https://docs.posit.co/ide/user/ide/guide/ui/command-palette.html

For inserting text that is then used by Visual Editor, there's also Snippets so you could insert additional items interactively: https://docs.posit.co/ide/user/ide/guide/productivity/snippets.html

jthomasmock commented 2 weeks ago

Moving to later for now. Thanks!