Tools --- Build system --- New Build System 添加新的编译文件
添加lua编译环境
{
"cmd": ["/usr/local/bin/lua","$file"],
"file_regex": "^(?:lua:)?[\t ](...*?):([0-9]*):?([0-9]*)",
"selector": "source.lua"
}
注意:souurce.lua" 后面不要有,
/usr/local/bin/lua
是lua 解析器的路径所在位置
这个换成自己的就好了。
没有lua的可以自己装一下 用Cakebrew 这个软件。或直接用brew来装, 也可以上lua的官方网站下载,然后自己make一下。把解析器给编译出来。
编译lua:到所在的路径 make 平台 (aix bsd c89 freebsd generic linux macosx mingw posix solaris)
比如:mac
make macosx 这样可以编译出来了。
添加完之后,Build System 里面就会有Lua编译,然后选择。 Command + b 就会直接运行出结果。