1. Installing the LUA Compiler
- download Lua, http://www.lua.org/;
- after decompression, CD into the folder src directory, modify makefile in MacOSX after a row to be MacOSX: $ (make) all mycflags= "-dlua_use_linux-arch i386" mylibs= "-arch i386-lreadline" Save exit.
- execute make MacOSX in the current folder and enter
- CD to previous directory, execute sudo make install
- after completing the execution lua-v can see: [python] view plain copy
- Lua 5.1. 4 Copyright (C) 1994 - - lua.org, Puc-rio
indicates a successful installation; 2. InstallationSublime Text2
1. Open after downloading http://sublime-text-2.cn.uptodown.com;
{"cmd": ["/usr/local/bin/lua", "$file"], "File_regex": "^ (... *):( [0-9]*):? ([0-9]*) "," selector ":" Source.lua "}
2. Save As Lua.sublime-build, then restart sublime Text 23.ctrl+n new file, enter print ("Hello World") and save it to the English path directory4. Then ctrl+b start the compilation. You'll see
Note: Be sure to save in the English path, if saved in the Chinese path, the following exception appears:
[Python]View Plain Copy
- Traceback (most recent):
- File "./sublime_plugin.py", line 337, in run_
- file "./exec.py" 130 in
- unicodeencodeerror: ' ASCII ' in position - 37 : ORDINAL  not in + )
Setup of LUA Sublime TEXT2 development environment under Mac