vscode在终端快速打开
方法一(别名):
bash:
vim ~/.bashrc
zsh:
vim ~/.zshrc
添加如下配置:
alias code="/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code"
bash:
source ~/.bashrc
zsh:
source ~/.zshrc
方法二(软连接):
ln -s /Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code /usr/local/bin/code
方法三(通过vscode安装)
image.png即可通过code命令打开文件
网友评论