Browse Source

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>
Emily Grace Seville 2 years ago
parent
commit
34fa690979
1 changed files with 18 additions and 14 deletions
  1. 18 14
      pages/common/code.md

+ 18 - 14
pages/common/code.md

@@ -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}}`