In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces adding code snippets in Sublime Text, which is very detailed and has certain reference value. Friends who are interested must finish reading it!
When we write code, we always encounter code fragments that need to be used over and over again. At this time, it is necessary to copy and paste repeatedly, which greatly affects the efficiency. We can solve this problem well by using the snippet (code snippet) function of Sublime Text.
Popularly speaking, it is to save our commonly used code separately, and then call it repeatedly in the form of plug-ins.
Creation method: Tools (tools) > New Snippet (new clips)
At this point, the following code appears:
Among them, the part of the content wrapped by CDATA is the code snippet we want to insert, optional.
TabTrigger is an optional name for the autocomplete code function triggered by our tab key.
Scope, optional, scope of use, do not fill in represents valid for all documents. Attachment: source.css and test.html correspond to different files respectively.
Description, optional, display instructions in the snippet menu (Chinese is supported). If not defined, the menu displays the file name of the current file.
${1:this} indicates where the cursor stops after the code is inserted, and multiple can be inserted at the same time. Where: this is a custom parameter (optional).
${2} means that after the code is inserted, press the Tab key, and the cursor will jump to the appropriate position in order (and so on).
By now, you should have a general understanding. So let's start writing an example ourselves. As we all know, in Sublime, enter! Or html:5 and then press the tab key, you can automatically complete the HTML structure, but the result is relatively simple, I expanded its result content, added several mate tags, and added the page description.
Document ${1:} ${2: this is html content}] > hjs custom-html
Then save the code snippet, save it under Sublime Text3DataPackagesUser, and give it a name.
In this way, you can automatically complete this series of code by typing hjs+tab in the HTML page.
The above is all the content of the article "adding code snippets to Sublime Text". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.