Files
tldr/pages.zh/common/code.md
2022-03-27 02:25:15 -03:00

29 lines
549 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# code
> Visual Studio Code.
> 更多信息:<https://github.com/microsoft/vscode>.
- 打开 VS Code
`code`
- 在 VS Code 中打开当前目录:
`code .`
- 在 VS Code 打开一个文件或目录:
`code {{路径/文件或目录}}`
- 在当前打开的 VS Code 窗口中打开一个文件或目录:
`code --reuse-window {{路径/文件或目录}}`
- 在 VS Code 中对比两个文件:
`code -d {{文件1}} {{文件2}}`
- 用超级用户sudo权限打开 VS Code
`sudo code {{路径/文件或目录}} --user-data-dir`