1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-06-05 13:46:00 +02:00

code: refresh page (#8017)

* Refresh page:
- reorder examples
- better descriptions
- fix placeholder samples

* Replace `editor` with `Visual Studio Code`

* Enhance page title

* Simplify page title

Co-authored-by: CleanMachine1 <78213164+CleanMachine1@users.noreply.github.com>

* Enhance page title

Co-authored-by: CleanMachine1 <78213164+CleanMachine1@users.noreply.github.com>
This commit is contained in:
Emily Grace Seville 2022-04-16 12:42:11 +10:00 committed by GitHub
parent d6513baeee
commit 34fa690979
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,32 +1,36 @@
# code
> Visual Studio Code.
> Cross platform and extensible code editor.
> More information: <https://github.com/microsoft/vscode>.
- Open VS Code:
- Start Visual Studio Code:
`code`
- Open the current directory in VS Code:
- Open specific files/directories:
`code .`
`code {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}`
- Open a file or directory in VS Code:
- Compare two specific files:
`code {{path/to/file_or_directory}}`
`code --diff {{path/to/file1}} {{path/to/file2}}`
- Open a file or directory in the currently open VS Code window:
- Open specific files/directories in a new window:
`code --reuse-window {{path/to/file_or_directory}}`
`code --new-window {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}`
- Open a file or directory in a new VS Code window:
- Install/uninstall a specific extension:
`code --new-window {{path/to/file_or_directory}}`
`code --{{install|uninstall}}-extension {{publisher.extension}}`
- Compare two files in VS Code:
- Print installed extensions:
`code -d {{file1}} {{file2}}`
`code --list-extensions`
- Open VS Code with superuser (sudo) permissions:
- Print installed extensions with their versions:
`sudo code {{path/to/file_or_directory}} --user-data-dir`
`code --list-extensions --show-versions`
- Start the editor as a superuser (root) while storing user data in a specific directory:
`sudo code --user-data-dir {[path/to/directory}}`