tldr/pages/common/code.md

37 lines
873 B
Markdown
Raw Normal View History

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