From the course: Learning Sublime Text 3

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Using snippets in code

Using snippets in code - Sublime Text Tutorial

From the course: Learning Sublime Text 3

Start my 1-month free trial

Using snippets in code

- [Narrator] As you play with the Completions feature in Sublime Text, you'll quickly realize that some completions are a little smarter than others. For example, if I type the a tag here, and hit Tab to accept the completion, not only does it type my hyperlink code in there, but it also drops my cursor right inside the a href attribute, where I can type the address for my link. That's because this isn't a plain completion, this is a snippet, and a snippet is kind of a smart completion that contains fields and other logic. You can see down here in the status bar, it says field one of two, and I can move to my second field by hitting Tab. You'll see it's now dropped my cursor in between the starting and ending tags, so I can type my link text. You'll find that all of the HTML tags in the auto complete list are snippets that work this way, and you can also check out a list of snippets that's available for the current syntax by bringing up the Command Palette and typing snip. This isn't…

Contents