Created
May 28, 2019 07:52
-
-
Save Joaquin6/d15a072737167680fa74199f0115c5d5 to your computer and use it in GitHub Desktop.
This is the bash script I use to install a set of extensions to both the stable and insiders channels of VS Code. It should work on Linux, OS X and Windows (using git bash or something similar)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EXTENSIONS=( | |
"cssho.vscode-svgviewer" \ | |
"dbaeumer.vscode-eslint" \ | |
"EditorConfig.EditorConfig" \ | |
"ryzngard.vscode-header-source" \ | |
"spywhere.guides" \ | |
"Tyriar.sort-lines" \ | |
"Tyriar.lorem-ipsum" \ | |
"waderyan.gitblame" | |
) | |
for VARIANT in "code" \ | |
"code-insiders" | |
do | |
if hash $VARIANT 2>/dev/null; then | |
echo "Installing extensions for $VARIANT" | |
for EXTENSION in ${EXTENSIONS[@]} | |
do | |
$VARIANT --install-extension $EXTENSION | |
done | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version 1.2.0 of VS Code landed in the Stable channel on Monday the 6th of June and brought the following new command line args to code:
These finally allow an official mechanism to script extension installs, making it easier to maintain a consistent development environment across machines.
To customize this just replace the contents of the EXTENSIONS variable at the top with the IDs of your own preferred extensions. The easiest way to get the extension IDs is by installing the extension locally and running code --list-extensions. They can also be retrieved from the marketplace URL.
https://www.growingwiththeweb.com/images/2016/06/06/marketplace_url.png