2020-07-09 21:30:44 +01:00
|
|
|
|
# code
|
|
|
|
|
|
|
|
|
|
> Visual Studio Code.
|
2021-08-31 08:13:49 +01:00
|
|
|
|
> 更多信息:<https://github.com/microsoft/vscode>.
|
2020-07-09 21:30:44 +01:00
|
|
|
|
|
2022-03-27 06:25:15 +01:00
|
|
|
|
- 打开 VS Code:
|
2020-07-09 21:30:44 +01:00
|
|
|
|
|
|
|
|
|
`code`
|
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
- 在 VS Code 中打开当前目录:
|
2020-07-09 21:30:44 +01:00
|
|
|
|
|
|
|
|
|
`code .`
|
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
- 在 VS Code 打开一个文件或目录:
|
2020-07-09 21:30:44 +01:00
|
|
|
|
|
|
|
|
|
`code {{路径/文件或目录}}`
|
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
- 在当前打开的 VS Code 窗口中打开一个文件或目录:
|
2020-07-09 21:30:44 +01:00
|
|
|
|
|
|
|
|
|
`code --reuse-window {{路径/文件或目录}}`
|
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
- 在 VS Code 中对比两个文件:
|
2020-07-09 21:30:44 +01:00
|
|
|
|
|
|
|
|
|
`code -d {{文件1}} {{文件2}}`
|
|
|
|
|
|
2022-03-27 06:25:15 +01:00
|
|
|
|
- 用超级用户(sudo)权限打开 VS Code:
|
2020-07-09 21:30:44 +01:00
|
|
|
|
|
|
|
|
|
`sudo code {{路径/文件或目录}} --user-data-dir`
|