美文网首页
Sublime Command + B 运行Shell

Sublime Command + B 运行Shell

作者: 人仙儿a | 来源:发表于2018-11-09 15:02 被阅读42次

Sublime自带的build system中是没有shell选项的,直接command + b 也是没有任何反应。那我们就只能自己来写一个执行shell的,还好Sublime支持创建Build System

依次点击Sublime Tools > Build System > New Build System
在弹出框中替换成以下内容:
Sublime 3.*

{
    "shell_cmd": "chmod a+x $file && /bin/sh $file"
}

Sublime 2.*

{
    "cmd"       : ["bash", "$file"],
    "selector"  : "source.shell"
}

配置后保存(默认路径就行),切换我们刚才新建的build systemTools > Build Systems > 保存时创建的名字

再次按command + b就可以直接运行shell了。

以上教程在MAC上Sublime2、3 测试通过,其他版本请自行测试

原文链接 http://www.apkfuns.com/sublime-command-b-yun-xing-shell/

相关文章

网友评论

      本文标题:Sublime Command + B 运行Shell

      本文链接:https://www.haomeiwen.com/subject/wicjeftx.html