sublime text 编译lua(详细可靠)

来源:互联网 发布:bilibili直播姬mac版 编辑:程序博客网 时间:2024/05/21 17:24

1.需要lua.exe luac.exe

(获取方法:1.安装luaforwindows/scite,或者2编译源码)

2.添加lua.exe的路径到环境变量中

例如C:\Program Files (x86)\Lua\5.1 

3.sublimetext中 tools->build system->new build system

复制下面内容 替换原内容

{
    "cmd": ["lua", "$file"],
    "file_regex": "^(...*?):([0-9]*):?([0-9]*)",
    "selector": "source.lua"
}

保存,将名字改为lua.sublime-build

4.在sublimetext中 tools->build system中选择lua 这个编译系统

5.可以运行自己的lua代码了

0 0