Skip to content

Conversation

@xoolive
Copy link
Contributor

@xoolive xoolive commented Oct 26, 2021

What problem did you solve?

In my RMarkdown book project, I would like to render individual pages with a specific knit command. A settings entry does the job well. An alternative would be to include a header with a knit: entry in every single file I edit, but that is very inconvenient, and just noisy for other editors using different code editors (R Studio). The entry in the settings.json of the directory or in the .code-workspace file of the project is a single edit.

How can I check this pull request?

Add a r.rmarkdown.knit.command entry in your settings.json and position it as you wish, e.g. rmarkdown::render_site. Then knit any .Rmd file.

@renkun-ken
Copy link
Member

I refined the setting with a default value rmarkdown::render so that user knows what the value should look like.

Copy link
Member

@renkun-ken renkun-ken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@renkun-ken renkun-ken merged commit 33e9998 into REditorSupport:master Oct 29, 2021
@xoolive
Copy link
Contributor Author

xoolive commented Oct 29, 2021

Many thanks!

@xoolive xoolive deleted the pr-knitcmd branch October 29, 2021 09:33
ElianHugh pushed a commit to ElianHugh/vscode-R that referenced this pull request May 12, 2022
* get knit command from settings

* configuration option description

* Refine description

* Use a default value

* Update comment

Co-authored-by: Kun Ren <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants