Part of my job as a Cloud Developer Advocate is to present, whether that is at a lunch and learn session, a user group, a conference or a screen cast. One thing that’s become second nature to me with presenting is tweaking my editor font size, theme, etc. so that it is optimal for the audience. But this becomes a bit tedious, because I then have to go back and undo all my changes again and the constant change back and forth is annoying.
So with that I decided to create an extension for VS Code called Profile Switcher.
How It Works
When you save a profile with the extension it will create a copy of the settings.json
file that exists for your user (on Windows this is %APPDATA%\Roaming\Code\User\settings.json
) and then store it in the settings.json
file in settings property that the extension knows about.
Side note: It doesn’t clone the extension settings, just everything else, wouldn’t want you to have recursive settings saved! 🤣
Then when you load the a profile it will merge your current settings.json
with the previously saved one, updating the properties that are different (and not touching the ones that didn’t change). Because it updates your user settings.json
all open VS Code instances will have the changes applied, handy if you’re running demos across multiple VS Code instances!
A nifty side-effect of how this works is that if you’re using the Settings Sync extension your profiles will be synchronised with that, so when you jump between machines you can bring your profiles along with you!
This also means that it’s not just for presenting, it’s for any scenario where you might want to quickly jump between settings changes in VS Code.
Conclusion
I hope you find this extension useful and I’ve love to get some feedback on what it could also be used for. I’ve made the code available on GitHub so you can create an issue for me or propose an update. 😁
aaronpowell / vscode-profile-switcher
A VS Code extension for switching settings easily
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
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
.
Save Profile
This saved the…
Top comments (1)
This works out great, Aaron! 👏🏼
Just made two profiles very easily - one Default one and one for teaching. Going to share this with the egghead community as I'm sure they'll appreciate it 😄