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+.
![](https://coderwall-assets-0.s3.amazonaws.com/uploads/user/avatar/40563/527657_350954588303809_1195162128_n.jpeg)
@avenger7x thanks I will correct that.
![](https://coderwall-assets-0.s3.amazonaws.com/uploads/user/avatar/44093/d42a7264714dee5006b9c99d2567a320.jpeg)
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
![](https://coderwall-assets-0.s3.amazonaws.com/uploads/user/avatar/60447/5d59040e82b5fd59f9fdd8671b99a1c5.jpeg)
You should try emmet, it's just awesome
![](https://coderwall-assets-0.s3.amazonaws.com/uploads/user/avatar/48555/Profile200.jpg)
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.
![](https://coderwall-assets-0.s3.amazonaws.com/uploads/user/avatar/102523/933646d7afd4e864691bd26a57cc89f9.jpeg)
Now in sublime 2 version 2.0.2, build 2221 - it`s:
For Mac: Alt + Command + .<br />
For PC: Alt + .<br />
For Linux: Alt + .