Sublime Tips Plugin Development

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.