1安装 subslime text3
2 安装package control
点击打开链接
import urllib.request,os,hashlib; h = '2deb499853c4371624f5a07e27c334aa' + 'bf8c4e67d14fb0525ba4f89698a6d7e1'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)
用package control安装BracketHighlighter 和 Spacegray
3.1 BracketHighlighter 配置:
粘贴进 Preferences -> Package Settings -> Bracet Highlighter -> Bracket Settings - User
{ "bracket_styles": { "default": { "icon": "dot", "color": "brackethighlighter.default", "style": "outline" }, "unmatched": { "icon": "question", "color": "brackethighlighter.unmatched", "style": "outline" }, "curly": { "icon": "curly_bracket", "color": "brackethighlighter.curly", "style": "outline" }, "round": { "icon": "round_bracket", "color": "brackethighlighter.round", "style": "outline" }, "square": { "icon": "square_bracket", "color": "brackethighlighter.square", "style": "underline" }, "angle": { "icon": "angle_bracket", "color": "brackethighlighter.angle", "style": "underline" }, "tag": { "icon": "tag", // "endpoints": true, "color": "brackethighlighter.tag", "style": "outline" }, "c_define": { "icon": "hash" // "color": "brackethighlighter.c_define", // "style": "underline" }, "single_quote": { "icon": "single_quote", "color": "brackethighlighter.single_quote", "style": "outline" }, "double_quote": { "icon": "double_quote", "color": "brackethighlighter.double_quote", "style": "outline" }, "regex": { "icon": "regex" // "color": "brackethighlighter.quote", // "style": "underline" } } }
Preferences -> Settings Users
{ "theme": "Spacegray Eighties.sublime-theme", "color_scheme": "Packages/Theme - Spacegray/base16-eighties.dark.tmTheme", "font_face": "Monaco", "font_size": 10.0, "ignored_packages": [ ], "word_wrap": false, "highlight_line": true }
6 安装配置lua环境
Lua For WIndows下载地址:http://luaforge.net/projects/luaforwindows/
7 subslime 编译环境
{ "cmd": ["lua", "$file"], "file_regex": "^(?:lua:)?[\t ](...*?):([0-9]*):?([0-9]*)", "selector": "source.lua" }
ctrl + n新建一个lua文件,输入
7 cTags
cTags是一个用于从程序源代码树产生索引文件(或tag文件),从而便于文本编辑器来实现快速定位的实用工具。安装了这个插件以后,通过快捷键ctrl + t,ctrl + r来生成索引文件,在索引文件生成后,可以通过快捷键ctrl + 鼠标左键来跳到函数定义的地方,通过ctrl + 鼠标右键跳回上一次编辑的地方。这个功能在阅读代码时十分有用。(cTags快捷键及详情)
8