Sublime Text Snippets - Sublime Text

What are Sublime Text Snippets?

Snippets are the keen formats which can be reused at whatever point required. Sublime text editor incorporates snippets highlight for HTML layouts. In this part, you will find out about them in detail.

Understanding Snippets

Snippets are basic XML supported documents with different properties. They incorporate an augmentation called sublime-snippet. The root tag of XML component will be the <snippet> tag. Snippets made are saved in the Packages folder and are considered to live in this folder.

understanding_snippets

The record arrangement and sentence structure of snippets are talked about in detail as pursues −

  • Content −This topic explains about the snippet.
  • tabTrigger − It section describes about characters which trigger when the snippet is composed.
  • Extension − It explains about the scope of snippet stays dynamic.
  • Description − It explains about the meta description. It will be displayed when snippet's menu is open.

Creating First Snippet

You can make the default snippet Using Tools → Developer → Snippet option.

create_snippet_using_tools_developer_snippet_option

At that point, a demo snippet with the related tags will be made as appeared below −

demo_snippet

To make a first snippet in Sublime Text editor, tap the Tools menu and select the Snippets option starting from the drop window, as appeared in the screen capture here.

create_first_snippet

Presently, pick Snippet:html from the options displayed.

choose_snippet_html

This makes a default snippet on the predefined html record as appeared as follows.

default_snippet_on_html_file

Note that there are different snippets for various sorts of files. For html files in the code base, there are three snippets characterized in Sublime Text editor, as appeared as follows.

three_snippets_in_sublime_text_editor

Package Control Snippets

Control snippets are principally utilized for item advancement. With install packages option in Sublime editor, you can download any snippet required for web development and install it.

package_control_snippets

You may need the following packages for web development −

  • EverCodeLab Sublime supports for Ruby on Rails
  • Additional PHP snippets for PHP
  • HTML snippets for HTML files
  • Twitter Bootstrap snippets for Twitter Bootstrap
  • JavaScript snippets for JS files
  • jQuery snippets pack for jQuery

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Sublime Text Topics