Skip to content

Commit 381a123

Browse files
Adds VSCode migration page (#93)
* Adds VSCode migration page * Adds migration page to the sidebar * Updates to verbiage * Adds section about bundled IPykernel. * Adds capital-C Console to the accept list for Vale * Fixes linting error in unrelated file * Updates Python environment wording Co-authored-by: Julia Silge <julia.silge@gmail.com> * Updated verbiage based on latest recommendations * Updates page title * Updates to change some verbiage; add Command Palette heading * Update to move Python environment managers to included snippet * Removes "Positron's" contractions/possessives * Updates to Language docs --------- Co-authored-by: Julia Silge <julia.silge@gmail.com>
1 parent c644860 commit 381a123

File tree

6 files changed

+114
-5
lines changed

6 files changed

+114
-5
lines changed

.github/styles/config/vocabularies/posit-docs/accept.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Anthropic Claude
3535
Anthropic Claude Sonnet
3636
Google Gemini
3737
AWS Bedrock
38+
Console
3839
Action Bar
3940
Action Bars
4041
Top Action Bar

_python-managers.qmd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
* **venv**: Standard library virtual environments created with `python -m venv`
2+
* **uv**: Virtual environments and Python installations managed by `uv`
3+
* **pyenv**: Python installations managed by `pyenv`, including virtual environments
4+
* **conda**: Conda environments created with `conda create` or `mamba create`

_quarto.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ website:
7878
- updating.qmd
7979
- extension-development.qmd
8080
- folder-templates.qmd
81+
- text: "Migrating from VS Code"
82+
href: migrate-vscode.qmd
8183
- section: "Migrating from RStudio"
8284
contents:
8385
- rstudio-keybindings.qmd

extension-development.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ Add this command to your package.json:
183183
}
184184
```
185185

186-
### Run code in the console
186+
### Run code in the Console
187187

188188
Execute code in the active Python or R session:
189189

migrate-vscode.qmd

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
---
2+
title: Migrating to Positron from VS Code
3+
---
4+
5+
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.
6+
7+
## Overview
8+
9+
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.
10+
11+
Where Positron differs is in its language integration and data science capabilities:
12+
13+
- the Console for interactive Python and R sessions
14+
- the Variables pane and [Data Explorer](data-explorer.qmd), for inspecting live data
15+
- the Plots pane for visualizing plots and other generated graphics
16+
- the [Connections pane](/connections-pane.qmd) for managing database connections and exploring data
17+
- the [Help pane](/help-pane.qmd) for quick access to language and library documentation
18+
19+
This blend of familiarity and data science focus will supercharge your work with a low barrier to transition.
20+
21+
## First steps
22+
23+
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.
24+
25+
### Importing settings
26+
27+
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.
28+
29+
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...*.
30+
31+
### Installing extensions
32+
33+
Positron supports many extensions that you use in VS Code. These extensions can be installed using the Extensions pane, found in the Positron sidebar.
34+
35+
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.
36+
37+
::: callout-note
38+
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).
39+
:::
40+
41+
## Language support
42+
43+
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.
44+
45+
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.
46+
47+
:::: panel-tabset
48+
## Python
49+
50+
Positron has first-class support for Python, including a built-in Python Console for interactive sessions, a [Data Explorer](data-explorer.qmd) 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. The [Help pane](help-pane.qmd) provides quick access to Python and package documentation while you code.
51+
52+
### Prerequisites
53+
54+
To use Python in Positron, you need to have Python installed on your system. Positron supports several Python installation and environment managers, including:
55+
56+
{{< include "_python-managers.qmd" >}}
57+
58+
Positron automatically detects Python installations and environments created with these tools. This enables deep integration with Python features in the IDE. <!-- TODO: Add link above -->
59+
60+
### Coming from the Python extension
61+
62+
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:
63+
64+
- Code completion and IntelliSense, based on [Jedi](https://jedi.readthedocs.io/en/latest/)
65+
- Type checking, using [Pyright](https://microsoft.github.io/pyright/#/)
66+
- Formatting, using [Ruff](https://docs.astral.sh/ruff/)
67+
- Debugging
68+
- Jupyter notebook support
69+
- Variables pane, for inspecting variables and data frames
70+
- [Help pane](help-pane.qmd), for quick access to documentation
71+
72+
### Python in the Console
73+
74+
The Positron 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.
75+
76+
While you can launch IPython from the Terminal as you would in VS Code, the Console provides code completion, syntax highlighting, integration with the Variables and Plots panes, and other features that enhance the interactive experience.
77+
78+
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).
79+
80+
By default, the Console enables the IPython [`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).
81+
82+
## R
83+
84+
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.
85+
86+
### Prerequisites
87+
88+
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 -->
89+
90+
::: callout-note
91+
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.
92+
:::
93+
::::
94+
95+
## Command palette
96+
97+
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.
98+
99+
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.
100+
101+
## Help & feedback
102+
103+
You can learn more about Positron features in other guides within this section. If you encounter issues during migration or while using Positron, see the [troubleshooting guide](troubleshooting.qmd) for common solutions. The [FAQ](faqs.qmd) provides answers to frequent questions from users who are transitioning from other editors.
104+
105+
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.

python-installations.qmd

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ The discovery process includes both global Python installations and various virt
1313

1414
Positron supports the following Python environment managers:
1515

16-
* **venv**: Standard library virtual environments created with `python -m venv`
17-
* **uv**: Virtual environments and Python installations managed by `uv`
18-
* **pyenv**: Python installations managed by `pyenv`, including virtual environments
19-
* **conda**: Conda environments created with `conda create` or `mamba create`
16+
{{< include "_python-managers.qmd" >}}
2017

2118
Other tools may also be compatible, although they are not officially supported at this time.
2219

0 commit comments

Comments
 (0)