Home Download Buy Blog Forum Support

Automatic HTML tag completion (like in Espresso)

Automatic HTML tag completion (like in Espresso)

Postby joshadow on Thu Jan 10, 2013 11:44 am

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:

Image

As you can see, this is very fast and even works with custom tags. it also plays nice with self closing tags like <br /> 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?
joshadow
 
Posts: 2
Joined: Thu Jan 10, 2013 10:45 am

Re: Automatic HTML tag completion (like in Espresso)

Postby jmaker on Fri Jan 11, 2013 12:24 am

I think you should install the Emmet package.

http://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.

https://github.com/SublimeText/Tag

Just simply type
Code: Select all
</
and the rest of that tag will autocomplete.
jmaker
 
Posts: 5
Joined: Fri Jan 11, 2013 12:08 am

Re: Automatic HTML tag completion (like in Espresso)

Postby joshadow on Mon Jan 14, 2013 12:29 pm

Fantastic, thanks a ton! :D
The tag package did precisely what I needed.
joshadow
 
Posts: 2
Joined: Thu Jan 10, 2013 10:45 am

Re: Automatic HTML tag completion (like in Espresso)

Postby LOQUILLO on Wed Jan 16, 2013 11:39 pm

jmaker wrote: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.

https://github.com/SublimeText/Tag

Just simply type
Code: Select all
</
and the rest of that tag will autocomplete.

Today I was trying these packages and named Tag seems formidable, is excellent, it puts Sublime Text between text editors very professional
LOQUILLO
 
Posts: 4
Joined: Wed Jan 16, 2013 11:35 pm


Return to Ideas and Feature Requests

Who is online

Users browsing this forum: Majestic-12 [Bot] and 4 guests