Skip to content
This repository has been archived by the owner on Jul 18, 2022. It is now read-only.

Latest commit

 

History

History
93 lines (55 loc) · 8.52 KB

README.md

File metadata and controls

93 lines (55 loc) · 8.52 KB

This project is being archived as the feature is being added to VS Code itself, see https://code.visualstudio.com/updates/v1_69#_settings-profiles for testing and microsoft/vscode#116740 for tracking the feature integration.

VS Code Profile Switcher

Job Status
Overall Build Status
Linux (Node 10.x) Build Status
Linux (Node 12.x) Build Status
Windows (Node 10.x) Build Status
macOS (Node 10.x) Build Status

Badge for version for Visual Studio Code extension aaronpowell.vscode-profile-switcher Installs Rating The MIT License Live Share codecov

This extension allows you to define a number of settings profiles that you can easily switch between. The original idea for this extension came from my desire to have an easy way for me to switch my VS Code to a setup that was better optimised for presenting (changed themes, increase font size, etc).

Install

  • Open Extensions sidebar panel in Visual Studio Code. View → Extensions
  • Search for Profile Switcher
  • Click Install
  • Click Reload, if required

Features

The extension introduces four new commands that you can use from the command panel. All commands are prefixed with Profile Switcher.

Demo of the extension in action

Save Profile

This saved the current user settings with the name you provide. You can use this to create a new profile or you can update an existing profile. The profile, when saved, is done so against your user-level settings.

Extensions that are installed are stored with the profile. See Extensions for more information on how Extensions are handled.

Note: This looks at the settings at the user level and not the workspace.

Select Profile

This allows you to select a previously saved profile. It'll replace it at the user level, not the workspace level. It works by merging your saved settings over the top of your current settings.

The extensions that are linked to the profile will be installed and extensions that weren't in the profile are removed. See extensions for more information on how Extensions are handled.

Delete Profile

This removed a previously saved profile.

Select Live Share Profile

This will set a previously saved profile as the default profile to be used on VS Code Live Share.

Once set, when you launch a Live Share session your profile will be automatically enabled, and then once your session ends the previous profile will be loaded. Thanks @lostintangent for the PR that included it.

Extensions

A profile isn't just the settings you have enabled, but also the extensions that were installed. This allows you to create different profiles for different styles of development (e.g. a React profile and a Vue profile, loading their respective extensions only).

When you switch profiles the extension will attempt to be intelligent about how the extensions are removed but moving them to the Profile Switcher globalStoragePath before removing them. Then, when you need to install the extensions again it will attempt to get them from that location rather than having to download them from the marketplace (it'll fallback to marketplace if required).

Always On Extensions

There are some extensions you might always enabled, regardless of profile (such as Settings Sync). To support this there is a property called extensionsIgnore which is an array of extension ID's that will be ignored when switching profiles. By default it includes Settings Sync and Live Share.

Changes

See the CHANGELOG for the latest changes.

Roadmap

Got an idea for what you'd like this extension to do? Feel free to create an issue or pick up an open issue.

Resources

Want to build your own extensions? Here's some starting points

Credits

This was my first time trying to build an extension for VS Code and wouldn't have got this far without: