Short cut for close HTML tag in Sublime Text 2
Solution 1:
I just found out pressing
For Mac: Alt + Command + .
For PC: Alt + .
For Linux: Alt + .
will finish the tag you currently have open.
E.g. you type
<div>
Pressing the shortcut will give you
</div>
Solution 2:
You can just type the type of tag you would like to insert and press tab!
Examples:
- Type
div
then press Tab to get<div></div>
with the cursor in the tag's content, and tab again to exit the tag. - Type
a
then press Tab to get<a href=""></a>
with the cursor in the quotes, tab again to move to the tag's content, and tab again to exit the tag