Last Updated: September 09, 2019
·
12.32K
· jmarizgit

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.

6 Responses
Add your response

In Windows it's Alt+.

over 1 year ago ·

@avenger7x thanks I will correct that.

over 1 year ago ·

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

over 1 year ago ·

You should try emmet, it's just awesome

over 1 year ago ·

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.

over 1 year ago ·

Now in sublime 2 version 2.0.2, build 2221 - it`s:

For Mac: Alt + Command + .<br />
For PC: Alt + .<br />
For Linux: Alt + .

over 1 year ago ·