How to open VS code with terminal on mac?

On

mac, use the terminal tool (command line) to open the atom editor:

-sharp 
cd desktop/demo

-sharp  atom 
atom ./

recently wondered how to open the VS code editor, or subline test, using the terminal tool (command line).

Mar.20,2021

open template-a Sublime\ Text

The purpose of

open-a is to open it using the specified application. This may seem a bit cumbersome, but you can actually use the tab key to associate the application name.

for example, if you enter open template-a Sub , there is only one application name in the application that starts with sub , so the name will be completed.

< hr >

in addition to this native command-line mode, you can also register commands for vscode .
holding down win + shift + p typing code, will result in a command to register code . Enter code. will open the current folder with vscode .

clipboard.png


vscode document mentions that execute shell command

in vscode.
Open the Command Palette (managers P) and type shell command to find the Shell Command: Install 'code' command in PATH command.
Menu