1.修改光标大小
首选项--用户设置里添加如下代码:
"caret_extra_top":0,
"caret_extra_bottom":0,
"caret_extra_width":1
需要添加表元素分隔符;
2.自定义代码段(代码补全)
<snippet>
<content><![CDATA[Type your snippet here]]></content>
<!-- Optional: Tab trigger to activate the snippet -->
<tabTrigger>xyzzy</tabTrigger>
<!-- Optional: Scope the tab trigger will be active in -->
<scope>source.python</scope>
<!-- Optional: Description to show in the menu -->
<description>My Fancy Snippet</description>
</snippet>
<content></content>内容标签, <![CDATA[内容]]>
<tabTrigger></tabTrigger>触发标志,打出后按Table后Enter键自动补全
<scope></scope>作用范围,文件名
<description>0</description>该代码片段的描述
eg: (修改选中目标)
<content><![CDATA[Clog("${1:}",${2:10});]]></content>
<tabTrigger>log</tabTrigger>
输入log补全至Clog("",10);
光标停留在""内,按table键切至10 ,也可用$1改光标停留
$PARAM1, $PARAM2… | Arguments passed to the insert_snippet command. (Not covered here.) |
$SELECTION | The text that was selected when the snippet was triggered. |
$TM_CURRENT_LINE | Content of the line the cursor was in when the snippet was triggered. |
$TM_CURRENT_WORD | Current word under the cursor when the snippet was triggered. |
$TM_FILENAME | File name of the file being edited including extension. |
$TM_FILEPATH | File path to the file being edited.//所在文件路径 |
$TM_FULLNAME | User's user name. |
$TM_LINE_INDEX | Column the snippet is being inserted at, 0 based. |
$TM_LINE_NUMBER | Row the snippet is being inserted at, 1 based.//所在行号 |
$TM_SELECTED_TEXT | An alias for $SELECTION. |
$TM_SOFT_TABS | YES if translate_tabs_to_spaces is true, otherwise NO. |
$TM_TAB_SIZE | Spaces per-tab (controlled by the tab_size option). |
效果:
====================================
USER NAME: $TM_FULLNAME
FILE NAME: $TM_FILENAME --所在文件名
TAB SIZE: $TM_TAB_SIZE
SOFT TABS: $TM_SOFT_TABS
====================================
# Output:
====================================
USER NAME: guillermo
FILE NAME: test.txt
TAB SIZE: 4
SOFT TABS: YES
====================================
3.添加lua编译系统luaJit
1、下载http://luajit.org/download.htm,
在LuaJIT-2.0.3\src目录下有个msvcbuild.bat批处理文件,需要先把luajit.exe这个东西给编译出来。
2、打开visual studio的命令行工具
3、用vs的命令行工具cd到luajit的src目录
4、执行msvcbuild.bat批处理文件,编译出luajit.exe
Packages 中添加 lua.sublime-build