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 { "cmd": ["d:/LuaJIT-2.0.3/src/luajit.exe", "$file"], "file_regex": "^(?:lua:)?[\t ](...*?):([0-9]*):?([0-9]*)", "selector": "d:/test/main.lua" }