code

code

TLDR

Start Visual Studio Code

$ code
copy


Open specific files/directories
$ code [path/to/file_or_directory1 path/to/file_or_directory2 ...]
copy


Compare two specific files
$ code --diff [path/to/file1] [path/to/file2]
copy


Open specific files/directories in a new window
$ code --new-window [path/to/file_or_directory1 path/to/file_or_directory2 ...]
copy


Install/uninstall a specific extension
$ code --[install|uninstall]-extension [publisher.extension]
copy


Print installed extensions
$ code --list-extensions
copy


Print installed extensions with their versions
$ code --list-extensions --show-versions
copy


Start the editor as a superuser (root) while storing user data in a specific directory
$ sudo code --user-data-dir [path/to/directory]
copy

Copied to clipboard