CARVIEW |
Select Language
HTTP/2 200
date: Wed, 23 Jul 2025 22:37:37 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-robots-tag: none
etag: W/"a58ba0673059cc56cdcae5787909fb0f"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=duURDhVskqYVvDR1g9164P665h4OOpGf7AAGSbU652i9dSM8OJ1WD7%2BkvOEwiYhXChRQiHcx6BMvWQV1D0aTpQ8PC50jV9g1h6r3ihUUgvkysL8ELgd792EOtPqQP8nEVvsPy3TXZgLmLZYk%2BHNpRmpfz6SUqwu913T1%2Bt1yjortLzgbMC0IzxokPi%2FGq%2FBZ432lmMFpbdC%2Bf68%2Bgq9lScntablLHbMQSLMZ57plVVF7N1F50Vv%2BahKinsDCLnhSKHF4KpvlSMGdppiRHS7FEg%3D%3D--PxFU5Crba8jHzgzC--OMrKlxVjLRpHTDQoqlg3jg%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.760175771.1753310257; Path=/; Domain=github.com; Expires=Thu, 23 Jul 2026 22:37:37 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Thu, 23 Jul 2026 22:37:37 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: B348:35B563:1126CEB:148A5E3:68816431
Keyboard shortcuts · REditorSupport/vscode-R Wiki · GitHub
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 133
Keyboard shortcuts
Iakov Davydov edited this page Sep 25, 2023
·
19 revisions
Add to keybindings.json
:
[
{
"key": "alt+-",
"command": "type",
"when": "editorLangId == r && editorTextFocus || editorLangId == rmd && editorTextFocus",
// if you want using quarto, try this
// "when": "editorLangId =~ /r|rmd|qmd/ && editorTextFocus",
"args": {"text": " <- "}
},
{
"key": "ctrl+shift+m",
"command": "type",
"when": "editorLangId == r && editorTextFocus || editorLangId == rmd && editorTextFocus",
"args": {"text": " %>% "}
},
{
"key": "ctrl+shift+m",
"command": "-workbench.actions.view.problems"
},
// input indicative of r markdown code chunk
{
"key": "ctrl+shift+i",
"command": "editor.action.insertSnippet",
"when": "editorTextFocus && editorLangId == 'rmd'",
"args": {
"snippet": "```{r}\n${TM_SELECTED_TEXT}$0\n```"
},
"label": "input indicative of r markdown code chunk"
},
// you can also input indicative of code chunk in `r` file by inserting "# %% ":
// specifics in `https://github.com/REditorSupport/vscode-R/pull/662`
{
"key": "ctrl+shift+i",
"command": "editor.action.insertSnippet",
"when": "editorTextFocus && editorLangId == 'r'",
"args": {
"snippet": "$LINE_COMMENT %% "
},
"label": "input indicative of code chunk"
},
// open help panel for selection
{
"key": "f1",
"command": "r.helpPanel.openForSelection",
"when": "editorTextFocus && editorLangId == 'r' || editorTextFocus && editorLangId == 'rmd'"
},
// read yaml header parameters into `params` when editing an Rmarkdown file
{
"key": "ctrl+shift+p",
"command": "r.runCommandWithEditorPath",
"args": "params <- rmarkdown::yaml_front_matter(\"$$\")$params |> lapply(\\(x) if (is.list(x)) x$value else x)",
"when": "editorTextFocus && editorLangId == 'rmd'"
},
// RStudio keybinding for R Package development
{
"key": "ctrl+shift+b",
"command": "r.install",
"when": "resourceLangId == 'r'"
},
{
"key": "ctrl+shift+e",
"command": "r.check",
"when": "resourceLangId == 'r'"
},
{
"key": "ctrl+shift+t",
"command": "r.test",
"when": "resourceLangId == 'r'"
},
{
"key": "ctrl+shift+d",
"command": "r.document",
"when": "resourceLangId == 'r'"
},
{
"key": "ctrl+shift+l",
"command": "r.loadAll",
"when": "resourceLangId == 'r'"
},
{
"key": "ctrl+alt+p",
"command": "r.runCommand",
"when": "editorTextFocus && editorLangId == 'r'",
"args": ".vsc.browser(httpgd::hgd_url(), viewer = \"Beside\")"
}
]
These keyboard shortcuts used to be set by this extension, but were removed
because they conflicted with default Visual Studio Code shortcuts. If you would
like to restore them, add these to keybindings.json
:
[
{
"command": "r.nrow",
"key": "Ctrl+1",
"when": "editorTextFocus && editorLangId == 'r'"
},
{
"command": "r.length",
"key": "Ctrl+2",
"when": "editorTextFocus && editorLangId == 'r'"
},
{
"command": "r.head",
"key": "Ctrl+3",
"when": "editorTextFocus && editorLangId == 'r'"
},
{
"command": "r.thead",
"key": "Ctrl+4",
"when": "editorTextFocus && editorLangId == 'r'"
},
{
"command": "r.names",
"key": "Ctrl+5",
"when": "editorTextFocus && editorLangId == 'r'"
}
]
There are 3 ways you can use extension functions to create keybindings that run R commands in the terminal:
-
r.runCommand
to make a keybinding to run any R expression. -
r.runCommandWithEditorPath
to create a keybinding for an R expression where the placeholder value$$
is interpolated with the current file path. -
runCommandWithSelectionOrWord
to create a keybinding for an R expression where$$
is interpolated with the current selection or the current word the cursor is on.
Here are some example entries from keybindings.json
:
[
{
"description": "run drake::r_make()",
"key": "ctrl+;",
"command": "r.runCommand",
"when": "editorTextFocus",
"args": "drake::r_make()"
},
{
"description": "load drake target at cursor",
"key": "ctrl+shift+;",
"command": "r.runCommandWithSelectionOrWord",
"when": "editorTextFocus",
"args": "drake::loadd($$)"
},
{
"description": "knit to html",
"key": "ctrl+i",
"command": "r.runCommandWithEditorPath",
"when": "editorTextFocus",
"args": "rmarkdown::render(\"$$\", output_format = rmarkdown::html_document(), output_dir = \".\", clean = TRUE)"
}
]
- Getting Started
- Installation
- Configuration
- Features
- Package development
- R Markdown
- Contributing
- FAQ
Clone this wiki locally
You can’t perform that action at this time.