tldr/pages/common/code.md

33 lines
641 B
Markdown
Raw Normal View History

2017-10-24 17:11:53 +01:00
# code
> Visual Studio Code.
> 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:
`code {{path/to/file_or_directory}}`
- Open a file or directory in the currently open VS Code window:
`code --reuse-window {{path/to/file_or_directory}}`
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}}`
- Compare two files in VS Code:
`code -d {{file1}} {{file2}}`
- Open VS Code with superuser (sudo) permissions:
`sudo code {{path/to/file_or_directory}} --user-data-dir`