您的位置:首页 > 其它

Mac OS 中通过终端使用 code 命令打开 VS Code

2017-08-19 00:00 537 查看
摘要: 如何在 Mac OS 终端中使用 code 命令

编辑 ~/.bash_profile 文件

code () {
if [[ $# = 0 ]]
then
open -a "Visual Studio Code"
else
[[ $1 = /* ]] && F="$1" || F="$PWD/${1#./}"
open -a "Visual Studio Code" --args "$F"
fi
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  vscode mac