Edit the ~/.bash_profile file
code () {
if [[ $# = 0 ]]
then
open -a "Visual Studio Code"
else
[[ $1 = /* ]] && F="$1" || F="$PWD/${1#./}"
open -a "Visual Studio Code" --args "$F"
fi
}
Reproduced in: https://my.oschina.net/u/3117745/blog/1516678
Read More:
- MacOS adds code command to vs Code
- The solution of GDB code designed problem in Mac OS X
- Python – [encoding] in Python os.system Solution to Chinese garbled code when calling CMD command
- Vs2015 compiling ffmpeg source code
- [Solved] Mac Terminal error: command not found: telnet
- command/usr/bin/codesign failed with exit code 1- code sign error
- Several ways for Ubuntu to open command line terminal window
- An error is reported when installing the package directly in pycharm, but it can be installed through the terminal. Error non zero exit code (2)
- How does a Mac terminal exit the python command line
- Copy Xcode project encountered MAC error code – 8058 (error code – 8058)
- Error in header file when calling OpenGL to open obj file in vs2013: unable to open include file: “GL / glut. H”: no such file or directories
- Bash modifies the file names in the specified folder through MAC terminal (batch modification)
- Command not found: ADB appears on Mac
- Error: Command ‘/ usr / bin / clang’ failed with exit status 1 solution for Mac OS installation
- Unable to install SQL Server (setup.exe), VS Shell installation has failed with exit code 1638.
- In vs programming, the code of Ctrl + F5 is flashback
- Difference between vs code user and system version
- When VS code imported Cv2, an error ImportError: numpy.core.multiarray failed to import; There are no mistakes in using the Spyder
- Vs code solves the problem that latex does not display references and [?] is displayed in the text
- Error code elifecycle errorno when NPM install command is executed in Vue project