sublime text中使用cmd+B运行shell的设置

sublime text中使用cmd+B运行shell的设置

https://blog.csdn.net/fengmm521/article/details/78446514

tools/build system/new build system,

新建的运行设置,复制下边内容到这个文件,并保存:
{
“cmd”: [“sh”,”$file”],
“selector”: “source.shell”
}
文件名可以随便起,我就叫:
shell.sublime-build

放在你的sublime text的设置preferences/browser包目录/user下新建一个shell文件夹里面放这个文件(任意取名也可以);

然后编写.sh文件脚本时,使用.sh后缀。
在文件的第一行加上:

!bin/bash

像这样:

这时就可以在sublime text环境下按cmd + B来直接运行shell脚本了.

猜你喜欢

转载自blog.csdn.net/weixin_42284354/article/details/81328483
今日推荐