Things I Learned #3: VS Code, extensions, and the command line
In my last TIL post, I talked about using VS Code to perform a diff by using
code --diff file1 file2BTW, the --diff can be shortened to just -d.
In this edition of Things I Learned, I want to talk a little more about using Visual Studio Code from the command line. There are several good command-line arguments I've learned about recently.
The first argument is one that lets you output your list of installed extensions
code --list-extensionsIf you want the versions, tack on
--show-versionsHere's the output when I run it
You can also install an extension by
code --install-extension publisher.extensionSo, to install the Vim extension, it would look like this:
code --install-extension vscodevim.vimIf you want to avoid any prompts, you can add
You can remove an extension using
code --uninstall-extension publisher.extension
If you're having problems with Visual Studio Code, you can start it with all extensions disabled, too: