The question says it all.
How can I open VS Code editor from
e.g. for notepad++ I write
For command line heads you can also run
sudo ln -s "/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code" /usr/local/bin/code
this will do the exact same thing as the Shell Command: Install 'code' command in PATH command
feature in VSCode.
typing "code" in dos command prompt worked for me
Step 1: create a .bat file with the name you want e.g vscode.bat Step 2: Write your path to Visual Studio Code Step 3: Save it in C:\Windows\System32 directory
**
C:
cd Users\Bino\AppData\Local\Programs\Microsoft VS Code
Code.exe**
Step 4: You can call visual studio code from any where by typing "vscode" which is the name of your bat file
Sometimes setting path from VS Code command palette does not work
Instead manually add your VS Code to your path:
Run in terminal
sudo nano /etc/paths
Go to the bottom of the file, and enter the path you wish to add
Hit control-x to quit. Enter “Y” to save the modified buffer.
Restart your terminal and to test echo $PATH
. You should something similar
~ echo $PATH /Users/shashank/.nvm/versions/node/v8.9.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin
Next time, you navigate to your project folder from terminal
code .
code /path/to/project
Source
Delete old virtual environment and create a fresh virtual environment.
To open a file or directory use the command:
code /path/to/file/or/directory/you/want/to/open
For macOS users, it needs to be installed manually:
Command + Shift + P
to open the Command Palette.shell command
, to find the Shell Command: Install 'code' command in PATH
and select to install it.