2017-10-24 17:11:53 +01:00
|
|
|
# code
|
|
|
|
|
|
|
|
> Visual Studio Code.
|
2019-06-03 01:06:36 +01:00
|
|
|
> More information: <https://github.com/microsoft/vscode>.
|
2017-10-24 17:11:53 +01:00
|
|
|
|
|
|
|
- Open VS Code:
|
|
|
|
|
|
|
|
`code`
|
|
|
|
|
|
|
|
- Open the current directory in VS Code:
|
|
|
|
|
|
|
|
`code .`
|
|
|
|
|
|
|
|
- Open a file or directory in VS Code:
|
|
|
|
|
2019-02-08 00:28:43 +00:00
|
|
|
`code {{path/to/file_or_directory}}`
|
2017-12-18 10:26:49 +00:00
|
|
|
|
|
|
|
- Open a file or directory in the currently open VS Code window:
|
|
|
|
|
2019-02-08 00:28:43 +00:00
|
|
|
`code --reuse-window {{path/to/file_or_directory}}`
|
2018-12-03 15:18:25 +00:00
|
|
|
|
2022-01-27 17:12:15 +00:00
|
|
|
- Open a file or directory in a new VS Code window:
|
|
|
|
|
|
|
|
`code --new-window {{path/to/file_or_directory}}`
|
|
|
|
|
2018-12-03 15:18:25 +00:00
|
|
|
- Compare two files in VS Code:
|
|
|
|
|
|
|
|
`code -d {{file1}} {{file2}}`
|
2020-06-20 16:27:01 +01:00
|
|
|
|
2021-08-15 18:59:09 +01:00
|
|
|
- Open VS Code with superuser (sudo) permissions:
|
2020-06-20 16:27:01 +01:00
|
|
|
|
|
|
|
`sudo code {{path/to/file_or_directory}} --user-data-dir`
|