The question says it all.
How can I open VS Code editor from
e.g. for notepad++ I write
When installing on Windows, you will be prompted to add VS Code to your PATH.
I was trying to figure out how to open files with VS Code from the command line and I already had the capability - I just forgot I had already added it. You might already have it installed - check by navigating to a folder you want to open and running the command code .
to open that folder.
This will work. This is your directory name "Directory_Name"
sudo code --user-data-dir="Directory_Name"
VS Code is a must have code editor for 2018
For Windows 10 users a lot is possible, the same way the Mac OS users type code .
.
Look for you VS Code \bin folder path e.g C:\Program Files\Microsoft VS Code\bin
. The bin folder includes a file called code.cmd
Follow the steps below and be proud of the OS you use.
Search for "Advanced System Setting" from Start.
Click on Environment Variables
On System Variables choose "path" from Variable tab and click on Edit.
Click on New on the right side of the popup window.
Copy your path from the Explorer's breadcrumb path and paste it into the new opened path in step 4, example:- C:\Program Files\Microsoft VS Code\bin
Click Ok on all the open windows to confirm changes and restart your cmd
Go to your cmd
and navigate to you working directory on server and type code .
C:>cd wamp64\www\react-app> code .
to open with VS Code on Windows.
Visual Studio Code also includes a command prompt (terminal) window and you can open one or more of them with
Ctrl + `
on your keyboard.
Hope this helps some one like it did to many of us.
In windows you can add following path to environment variable
C:\Users\username\AppData\Local\Programs\Microsoft VS Code\bin
Open command line and type:
cd your_folder_path
code.cmd .
or
code.cmd your_folder_path
It will open your folder in Visual Studio Code. Make Sure, you are inside the correct folder after executing "cd your_folder_path" command.
A simple way is to go to your Project where you want to open it and type
code.cmd D:\PathTo\yourProject\MyProject
That's it. It will open your project in Visual Studio Code.