Plug-in Location: Sublime directory/package/specific to that language directory
Open from Menu: Preferences/browse Package/language
As Lua is the Sublime/package/lua directory
CTRL + SHIFT + P quick Command Panel can switch the format of the current file here, such as switching the current file to Lua or XML format
Now take Lua as an example to see how this tip plugin is written
Let's go to the Sublime/package/lua directory, see how the official writing, and then divert, the other language.
<snippet> <content><![ Cdata[for ${1:k},${2:v} in pairs (${3:table_name}) Do${0:print (k,v)} end]]></content> --content to display < ! [cdata[... Enter content ...] > ${1:} represents the variable's meaning <tabTrigger>forp</tabTrigger>--Set the input what comes out of this <scope>source.lua </scope> -This is a format for LUA without changing <description>for k,v in pairs () </description>--Hint text </ Snippet>
Enter the for display style so Forp For K, V in pairs ()
The display to the editing interface is like this
For K,V in pairs (table_name) do print (k,v) end
If you don't want the tab format to be written to the front, like end.
I wrote a format for creating lab
<snippet> <content><![ Cdata[local Lab = Subview:addcontrol ("Label") lab:setsize (100,20) lab:setposition (10,20) LAB:SETALIGNH (2) Lab: SETALIGNV (0) Lab:setcolor ("FFFFF799") lab:setfontsize ("") Lab:settext ("") Lab:setautowrap ()]]></content> <tabTrigger>Label</tabTrigger> <scope>source.lua</scope> <description >Label</description></snippet>
Enter a label selection followed by a label description to display the text on the content
The suffix is consistent with the official file, and put it in the LUA directory.
No inexplicable things, everything is out of thin air, there is always the source, study the natural water fell out, you and the great God is only a few books distance
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Sublime Tips Plugin Development