After installing Visual Studio Code, it will not automatically be added to your terminal path, so you will need to add it manually. here is how.
Open your terminal and run this command in your terminal
cat << EOF >> ~/.zprofile
# Add Visual Studio Code (code)
export PATH="\$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
EOF
Restart your terminal, and you should now be able to open Visual Studio Code directly from your terminal using this command
% code .
This will open the current folder in your Visual Studio Code. Thatβs it!
Resources:
Top comments (0)