The command \"code .\" doesn\'t work in this manual?
All the other steps before that worked. How can I call the Visual Studio Code in OSX terminal?
It might be possible that you have not installed the code in your system. So, please install it first. the command is here -
sudo snap install --classic code
Details are available is here
On my MAC I got it working:
add to .bash_profile
code() {
open -a Visual\ Studio\ Code.app $1
}
save and in terminal 'source .bash_profile'
Then in terminal code index.html (or whatever) will open that file in VS Code.
For Mac OSX: There is a way to install Visual Studio Code through Brew-Cask.
Now run following command and it will install latest Visual Studio Code on your Mac.
$> brew cask install visual-studio-code
Above command should install Visual Studio Code and also set up the command-line calling of Visual Studio Code.
If above steps don't work then you can do it manually. By following Microsoft Visual Studio Code documentation given here.
for the people who face the same problem in Windows - 10 please follow the below instructions,
https://github.com/Microsoft/vscode/issues/21957
It might be the case that, C:\Program Files (x86)\Microsoft VS Code\bin is missing in environment variables., kindly look into the following image for the solution, https://cloud.githubusercontent.com/assets/4076309/23575794/61d7cc2a-00b9-11e7-843b-bcd6f00f595f.png
I was having the same problem. I have to add Vs Code to my applications folder. It worked without editing a file.
This will work for you.
This work for me:
sudo ln -fs "/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code" /usr/local/bin/