---
title: Approaching Positron from VS Code for R
description: Learn how to transition from VS Code to Positron for R programming. This guide covers key features, shortcuts, and extensions to streamline your workflow.
---

[ixblog | ixpantia](https://www.ixpantia.com/en/blog)

# [Approaching Positron from VS Code for R](https://www.ixpantia.com/en/blog/positron-from-vs-code-for-r)

 Written by [Mauro Lepore](https://www.ixpantia.com/en/blog/author/mauro-lepore) | Feb 19, 2025 4:31:50 PM

[Positron](https://positron.posit.co/) is a polyglot IDE with great support for R. Because it’s similar in many ways to both [VS Code](https://code.visualstudio.com/) and [RStudio](https://posit.co/downloads/), it’s an excellent meeting point for those coming from either IDE. However, Positron is also different in many ways to both VS Code and RStudio, so the transition will come with some pain.

To reduce that pain and stay productive, you can taste Positron or start preparing for the transition with relatively small and few changes to your current workflow from the comfort of your favorite IDE.

This post targets a user like the one described by this story:

As someone working with R and used to VS Code, I want to know how to transition to Positron smoothly, so that I can more easily collaborate with colleagues coming from RStudio.

### Positron

If you come from VS Code and a language other than R, then you may not know exactly what to expect from an IDE that supports R, so here is an overview of what [Positron](https://positron.posit.co/) includes:

- Tools for data science: 
    - R console.
    - Ability to send R code from scripts to the console with ctrl+enter.
    - Panels to explore plots and data.
    - Support for Quarto.
- Tools for software development: 
    - Keyboard shortcuts for building R packages with devtools.
    - Support for Shiny.
    - Testing.
    - Tools for debugging R code.

You can enable [RSdudio keyboard shortcuts](https://positron.posit.co/keyboard-shortcuts.html#rstudio-keymap), e.g.:

- Send code to the R console: ctrl+enter
- Restart R: ctrl+shift+0
- Assign <-: alt+-
- Pipe |>: ctrl+M
- Develop R packages using the devtools workflow:
  
    - load\_all(): ctrl+shift+L
    - test(): ctrl+shift+T
    - document(): ctrl+shift+D
    - check(): ctrl+shift+E

### VS Code

One feature of [VS Code](https://code.visualstudio.com/) is that it’s lean and extensible. By default it comes with nothing of what’s listed above, but these few extensions and keyboard shortcuts approximate Positron’s experience for R.

- Extensions:

```
# Basic R support, e.g. send code to the R console with Ctrl+Enter code --install-extension reditorsupport.r# Needs this R packageRscript -e 'install.packages("languageserver")'# Debugcode --install-extension rdebugger.r-debugger# Testcode --install-extension hbenl.vscode-test-explorercode --install-extension meakbiyik.vscode-r-test-adapter# Shinycode --install-extension posit.shiny# Quartocode --install-extension quarto.quarto
```

TODO: In the VS Code command-palette run`r.debugger.updateRPackage`

- Shortcuts: Place your key bindings in this file to override the defaults: ~/.config/Code/User/keybindings.json

```
[  // BASIC R SUPPORT    {        // Create a new R terminal (similar to restarting R)        "key": "ctrl+shift+0",        "command": "r.createRTerm"    },    {        // Assign        "key": "alt+-",        "command": "type",        "args": { "text": " <- " },        "when": "editorTextFocus && editorLangId == 'r'"    },    {        // Pipe        "key": "ctrl+shift+m",        "command": "type",        "args": { "text": " |> " },        "when": "editorTextFocus && editorLangId == 'r'"    },    // R PACKAGE DEVELOPMENT WITH DEVTOOLS    {        "key": "ctrl+shift+l",        "command": "r.loadAll"    },    {        "key": "ctrl+shift+e",        "command": "r.check"    },    {        "key": "ctrl+shift+d",        "command": "r.document"    },    {        "key": "ctrl+shift+t",        "command": "r.test"    }]
```

 

[View full post](https://www.ixpantia.com/en/blog/positron-from-vs-code-for-r)

```json
{
  "@context" : "http://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Mauro Lepore"
  },
  "dateModified" : "2025-02-19T16:32:45.958Z",
  "datePublished" : "2025-02-19T16:31:50Z",
  "headline" : "Approaching Positron from VS Code for R",
  "image" : {
    "@type" : "ImageObject",
    "height" : 1260,
    "url" : "https://40151821.fs1.hubspotusercontent-na1.net/hubfs/40151821/Mauro-1.png",
    "width" : 2240
  },
  "mainEntityOfPage" : "https://www.ixpantia.com/en/blog/positron-from-vs-code-for-r",
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "height" : 60,
      "url" : "/hs/hsstatic/content_shared_assets/static-1.4092/img/default-amp-logo.png",
      "width" : 60
    },
    "name" : "ixblog | ixpantia"
  }
}
```