1, 进入官网下载VSCode,安装,打开软件。官网地址
2, 方法一,但是这种方法对我来说像是临时的,每次重启电脑后又失效了。
Open the Command Palette (⇧⌘P) and type ‘shell command’ to find the Shell Command: Install ‘code’ command in PATH command.
3, 方法二,在.bash_profile文件里加入环境变量。
1 | export PATH="\$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin" |
由于我没有这个文件,自己touch了一个,修改后执行source ~/.bash_profile
,接着恐怖的事情发生了,我所有的命令除了cd都失效了…