tldr/pages.zh/common/code.md

29 lines
546 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# 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`