Website: https://code.visualstudio.com
VSCode Documentation: https://code.visualstudio.com/docs
Install Visual Studio Code
brew cask install visual-studio-code
Verify the Installed Visual Studio Code Version
code -v
Visual Studio Code CLI Help
code --help
Add Visual Studio Code to PATH
cat << EOF >> ~/.bash_profile
# Add Visual Studio Code (code)
export PATH="\$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
EOF
Open Project in Visual Studio Code
cd my_dev_project_directory
If this is a existing folder then it will load all the project files present in this directory in VS Code
code .
Opens a New Session of Visual Studio Code
code -n
Open a File in Visual Studio Code
This command will create the file if the file is not existing with this name in the current directory.
code filename
Open a File in Visual Studio Code with Cursor at a particular line
code -g filename:line
Open a diff in Visual Studio Code
code -d filename1 filename2
Top comments (0)