Sublime Forum

Automatic HTML tag completion (like in Espresso)

#1

I’m used to working with MacRabbit’s Espresso for mac, but recently I’ve been trying to find a good windows web editor and have picked up Sublime, which I’ve also been considering trying for mac.

Espresso has a kind of smart tag completion for html tags that I’ve really come to rely on, and was curious if there was an equivalent for Sublime.

Basically because every html tag that’s opened needs a matching closing tag, the editor knows if you are starting a closing tag, which one it should be, and simply closes the currently open tag automatically, without even requiring you to press tab or anything. You just start typing “</” and the editor instantly completes the currently open tag:

As you can see, this is very fast and even works with custom tags. it also plays nice with self closing tags like
that don’t count towards needing to be closed then.

I’ve found this to be incredibly time saving, to the point where now I feel like I’m really wasting time in Sublime when I have to type out any closing tag by hand.

Is there a way to enable something like this in Sublime, or a package that might add such functionality?

-edit-
I’ve found that with alt+. you can close tags. Is there a way that when I type the characters “</” the editor parses them out and that command, which would effectively emulate the same functionality from Espresso?

0 Likes

#2

I think you should install the Emmet package.

docs.emmet.io/

You can save even more time without having to type any brackets at all.

But there is another package that will do exactly what you want. The package is simply called Tag.

github.com/SublimeText/Tag

Just simply type </ and the rest of that tag will autocomplete.

0 Likes

#3

Fantastic, thanks a ton! :smiley:
The tag package did precisely what I needed.

0 Likes

#4

[quote=“jmaker”]I think you should install the Emmet package.
But there is another package that will do exactly what you want. The package is simply called Tag.

github.com/SublimeText/Tag

Just simply type </ and the rest of that tag will autocomplete.[/quote]

Today I was trying these packages and named Tag seems formidable, is excellent, it puts Sublime Text between text editors very professional

0 Likes