2017-10-24 17:11:53 +01:00
|
|
|
# code
|
|
|
|
|
2022-04-16 03:42:11 +01:00
|
|
|
> Cross platform and extensible code editor.
|
2019-06-03 01:06:36 +01:00
|
|
|
> More information: <https://github.com/microsoft/vscode>.
|
2017-10-24 17:11:53 +01:00
|
|
|
|
2022-04-16 03:42:11 +01:00
|
|
|
- Start Visual Studio Code:
|
2017-10-24 17:11:53 +01:00
|
|
|
|
|
|
|
`code`
|
|
|
|
|
2022-04-16 03:42:11 +01:00
|
|
|
- Open specific files/directories:
|
2017-10-24 17:11:53 +01:00
|
|
|
|
2022-04-16 03:42:11 +01:00
|
|
|
`code {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}`
|
2017-10-24 17:11:53 +01:00
|
|
|
|
2022-04-16 03:42:11 +01:00
|
|
|
- Compare two specific files:
|
2017-10-24 17:11:53 +01:00
|
|
|
|
2022-04-16 03:42:11 +01:00
|
|
|
`code --diff {{path/to/file1}} {{path/to/file2}}`
|
2017-12-18 10:26:49 +00:00
|
|
|
|
2022-04-16 03:42:11 +01:00
|
|
|
- Open specific files/directories in a new window:
|
2017-12-18 10:26:49 +00:00
|
|
|
|
2022-04-16 03:42:11 +01:00
|
|
|
`code --new-window {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}`
|
2018-12-03 15:18:25 +00:00
|
|
|
|
2022-04-16 03:42:11 +01:00
|
|
|
- Install/uninstall a specific extension:
|
2022-01-27 17:12:15 +00:00
|
|
|
|
2022-04-16 03:42:11 +01:00
|
|
|
`code --{{install|uninstall}}-extension {{publisher.extension}}`
|
2022-01-27 17:12:15 +00:00
|
|
|
|
2022-04-16 03:42:11 +01:00
|
|
|
- Print installed extensions:
|
2018-12-03 15:18:25 +00:00
|
|
|
|
2022-04-16 03:42:11 +01:00
|
|
|
`code --list-extensions`
|
2020-06-20 16:27:01 +01:00
|
|
|
|
2022-04-16 03:42:11 +01:00
|
|
|
- Print installed extensions with their versions:
|
2020-06-20 16:27:01 +01:00
|
|
|
|
2022-04-16 03:42:11 +01:00
|
|
|
`code --list-extensions --show-versions`
|
|
|
|
|
|
|
|
- Start the editor as a superuser (root) while storing user data in a specific directory:
|
|
|
|
|
2022-07-13 20:55:50 +01:00
|
|
|
`sudo code --user-data-dir {{path/to/directory}}`
|