shell
Build Stytem > New Build Stytem …
1 | { "shell_cmd": "chmod a+x $file && /bin/sh $file"} |
ctrl+s 保存 sh.sublime-build
路径: ~/.config/sublime-text-3/Packages/User/sh.sublime-build
执行脚本快捷键 ctrl+b
lua
1 | ❯wget http://www.lua.org/ftp/lua-5.3.5.tar.gz |
找到 Lua 源代码目录中的
Makefile
找到INSTALL_TOP
变量的定义,并将其设置为你希望 Lua 安装的路径
/opt/proxy/lua/bin/lua
Sublime提示找不到lua
1 | ❯ sudo ln -s /opt/proxy/lua/bin/lua /usr/local/bin/lua |
lua
1 | { "cmd": ["lua", "$file"], "file_regex": "^(?:lua:)?[\t ](...*?):([0-9]*):?([0-9]*)", "selector": "source.lua"} |
luajit
1 | { "cmd": ["luajit", "$file"], "file_regex": "^(?:lua:)?[\t ](...*?):([0-9]*):?([0-9]*)", "selector": "source.lua"} |
luarocks
1 | $ wget https://luarocks.org/releases/luarocks-3.11.1.tar.gz |
Configuring LuaRocks version 3.11.1…
Lua version detected: 5.3
Lua interpreter found: /opt/proxy/lua/bin/lua
lua.h found: /opt/proxy/lua/include/lua.h
unzip found in PATH: /usr/binDone configuring.
LuaRocks will be installed at……: /opt/proxy/luarocks
LuaRocks will install rocks at…..: /opt/proxy/luarocks
LuaRocks configuration directory…: /opt/proxy/luarocks/etc/luarocks
Using Lua from…………………: /opt/proxy/lua
- Type make and make install:
to install to /opt/proxy/luarocks as usual.- Type make bootstrap:
to install LuaRocks into /opt/proxy/luarocks as a rock.❯ make -j6
❯ make install >& log &
1 | luarocks install luasocket |