Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/styles/config/vocabularies/posit-docs/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ GitHub Copilot
Anthropic Claude
Anthropic Claude Sonnet
Google Gemini
AWS Bedrock
AWS Bedrock
Console
2 changes: 2 additions & 0 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ website:
- remote-ssh.qmd
- updating.qmd
- extension-development.qmd
- text: "Migrating from VS Code"
href: migrate-vscode.qmd
- section: "Migrating from RStudio"
contents:
- rstudio-keybindings.qmd
Expand Down
2 changes: 1 addition & 1 deletion extension-development.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ Add this command to your package.json:
}
```

### Run code in the console
### Run code in the Console

Execute code in the active Python or R session:

Expand Down
102 changes: 102 additions & 0 deletions migrate-vscode.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
---
title: Migrating to Positron from VS Code
---
This document outlines how to migrate from VS Code to Positron, a data science-focused editor built on Code OSS. It covers importing VS Code settings and extensions, and explains Positron's enhanced data science features like the Console, Variables pane, Data Explorer, and Plots pane. The guide also details Positron's native support for Python and R workflows, including prerequisites and key differences from VS Code extensions.



## Overview
Positron will feel natural to you if you use VS Code. Positron is built on [Code OSS](https://github.com/microsoft/vscode), the open source core of VS Code. You will find many familiar features like the text editor interface, command palette, terminal, and extensions.

Where Positron differs is in its language integration and data science capabilities:

- the Console for interactive Python and R sessions
- the Variables pane and [Data Explorer](data-explorer.qmd), for inspecting live data
- the Plots pane for visualizing plots and other generated graphics
- the [Connections pane](/connections-pane.qmd) for managing database connections and exploring data
- the [Help pane](/help-pane.qmd) for quick access to language and library documentation

This blend of familiarity and data science focus will supercharge your work with a low barrier to transition.

## First steps
When you launch Positron for the first time, you likely want to import your existing VS Code settings and install the extensions you are used to.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

"When you launch Positron for the first time, you likely want to import your existing VS Code settings and install the extensions you are used to."

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We don't have a way to import extensions currently (pretty difficult, given extensions coming from the MS marketplace vs. OpenVSX) so I would recommend that we only mention settings here, not extensions.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think "importing settings" and "installing extensions" communicates the difference; no?

### Importing settings
Positron supports importing settings from VS Code. It will prompt you to do so with a notification on the first launch, allowing you to import user settings from your existing VS Code installation. It will open a preview before saving these imported settings, so you can review and modify them as needed.

If you skip this step, you can import settings at any time by opening the Command Palette (<kbd>Cmd/Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd>) and running the command _Preferences: Import Settings..._.

### Installing extensions
Positron supports many extensions that you use in VS Code. These extensions can be installed using the Extensions pane, found in the Positron sidebar.

If an extension does not appear in your search, it may be unavailable on the extension marketplace that Positron uses, [OpenVSX](https://open-vsx.org/). You can contact the developer of that extension to [request its publication to OpenVSX](extensions.qmd#open-vsx) for installation in Positron.

::: callout-note
Positron comes bundled with several useful extensions, including those for Quarto, Jupyter notebooks, and Pyright. It also includes built-in extensions to enable language features. More information about these default extensions can be found in the [Extensions documentation](extensions.qmd#included-extensions).
:::

## Language support

Positron provides native language integration for Python and R. Unlike VS Code, which relies on extensions for language support, Positron has built-in interpreters and language servers for both languages. This native integration enables deeper features like the Console, Variables pane, and Data Explorer to work seamlessly with your code and data.

The language support includes intelligent code completion, syntax highlighting, error detection, and debugging capabilities. You can switch between Python and R environments within the same workspace, making it easy to work on multilingual data science projects.

::: {.panel-tabset}

## Python
Positron has first-class support for Python, including a built-in Python Console for interactive sessions, a Data Explorer to inspect data frames, a Plots pane to visualize plots and other generated graphics, and a fully interactive Viewer pane to see locally running content. Positron also supports Python packages and libraries, allowing you to work with popular data science tools like NumPy, Pandas, Matplotlib, and more.

### Prerequisites
To use Python in Positron, you need to have Python installed on your system. Positron supports several Python installation and environment managers, including:

- [venv](https://docs.python.org/3/library/venv.html)
- [uv](https://docs.astral.sh/uv/)
- [pyenv](https://github.com/pyenv/pyenv)
- [conda](https://docs.conda.io/en/latest/)

Python installations and environments created with these tools will be automatically detected, and enable Positron's deep integration with Python.
<!-- TODO: Add link above -->

### Coming from the Python extension
VS Code users who rely on the `ms-python.python` extension will find that Positron provides all of its functionality and more by default. These include:

- Code completion and IntelliSense, based on [Jedi](https://jedi.readthedocs.io/en/latest/)
- Type checking, using [Pyright](https://microsoft.github.io/pyright/#/)
- Formatting, using [Ruff](https://docs.astral.sh/ruff/)
- Debugging
- Jupyter notebook support
- Variables pane, for inspecting variables and data frames
- [Help pane](help-pane.qmd), for quick access to documentation

### Python in the Console
Positron's Console pane provides an interactive IPython session. You can type Python code directly into the Console or run files open in the editor. You can also choose to run a portion of a file open in the editor, similar to a Jupyter Notebook but with any standard Python file.

While you can launch IPython from the Terminal as you would in VS Code, the Console provides code completion, syntax highlighting, and integration with the Variables and Plots panes -- among other features that enhance the interactive experience.

Positron bundles IPython, allowing you to use the console without installing it separately. If you wish to use an external version of IPython, you can toggle the use of the bundled one with the [`python.useBundledIpykernel` setting](positron://settings/python.useBundledIpykernel).

By default, the Console enables IPython's [`autoreload` extension](https://ipython.readthedocs.io/en/stable/config/extensions/autoreload.html) for imports. You can change this with the [`python.enableAutoReload` setting](positron://settings/python.enableAutoReload).


## R
Positron has a deeper and more cohesive integration for R workflows than VS Code. Its approach works seamlessly with R and does not require any extensions for this integration. You can use the Console for interactive R sessions, the Variables pane and [Data Explorer](data-explorer.qmd) for inspecting data frames, the Plots pane for visualizing plots and other graphics, and the [Help pane](help-pane.qmd) for quick access to documentation.

### Prerequisites
To use R in Positron, you need to have R installed on your system. Positron automatically detects your R installation and provides full language support.
<!-- TODO: Add link above -->

::: callout-note
If you have been accustomed to using the `vscode-r` extension in VS Code, be aware that [this extension is not compatible with Positron](extensions.qmd#non-compatible-extensions). Positron's native integration means you do not need the `vscode-r` extension; instead, Positron's built-in features allow you to work with your R code and data.
:::
:::

## Command palette

If you are familiar with the Command Palette in Visual Studio Code, you will find the experience in Positron very similar. All Positron-specific commands are included, alongside the familiar VS Code commands.

For a detailed overview of the Command Palette, see the [Visual Studio Code Command Palette documentation](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette). Most of the tips and workflows described there also apply to Positron.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for adding this! Once we get a section about the command palette in the user interface doc, I'll swap the VS Code link out for a link to the command palette section.


## Help & feedback
Positron's features are explored further in other Guides within this section. If you encounter any issues during migration or while using Positron, check out the [troubleshooting guide](troubleshooting.qmd) for common solutions. The [FAQ](faqs.qmd) addresses a comprehensive list of frequent questions from users transitioning from other editors.

Your experience and feedback help to improve Positron. Share your thoughts, report bugs, or suggest features through Positron's [feedback channels](feedback.qmd). Your input is valuable in making sure Positron development better serves the data science community.