Sublime Text 2: close tags shortcut
Before use Sublime Text 2 on OSX I used Smultron (another impressive lightweight editor). Well, Smultron has this easy to use Tag completion shortcut (Command + t) and today I was wondering how to do the same in Sublime.
Playing around I discover that you just need to use the below shortcut.
on mac:
Option + Command + .
on windows:
Alt + .
Done, your tag is closed.
Written by Mariz Melo
Related protips
6 Responses
In Windows it's Alt+.
@avenger7x thanks I will correct that.
It's better to juse install the Tag package and have your html/xml tags close automatically when you start to type </
. The package also provides some other features
You should try emmet, it's just awesome
As far as I can tell, ST2 has default support for tag autocompletion by using tab. Example: type div
, then hit TAB
, and you get <div></div>
. It works beautifully on my ST2 install (osx) without any additional packages.
Now in sublime 2 version 2.0.2, build 2221 - it`s:
For Mac: Alt + Command + .<br />
For PC: Alt + .<br />
For Linux: Alt + .