Home Download Buy Blog Forum Support

Adding id's & classes to tags

Adding id's & classes to tags

Postby MrMartineau on Thu Sep 22, 2011 9:48 am

I may be wrong or I may be slightly mistaken but I'm sure there was a time - a few dev builds ago maybe - that I could type
Code: Select all
#
while in an open
Code: Select all
div
and it would immediately convert to this:
Code: Select all
id=""
with the cursor in between the quotes.The final output would be
Code: Select all
<div id="">

I loved that feature!

BTW, adding a class, quickly, used a
Code: Select all
.


The reason I maybe wrong or mistaken is because it easily could've been a plugin that produced this functionality & not Sublime itself; when I first started using Sublime I went a bit plugin crazy so I can't be sure if it was native or not..

Can anyone back me up on this or point me in the right direction?
@MrMartineau || Setup Sublime Text quickly: Find out all you need at https://github.com/mrmartineau/SublimeTextSetup
MrMartineau
 
Posts: 78
Joined: Thu Jul 28, 2011 8:35 am

Re: Adding id's & classes to tags

Postby iamntz on Thu Sep 22, 2011 9:50 am

It's a behavior inducted by zencoding plugin.
iamntz
 
Posts: 917
Joined: Fri Apr 29, 2011 8:52 am
Location: Romania

Re: Adding id's & classes to tags

Postby MrMartineau on Thu Sep 22, 2011 10:13 am

ah ok... seems strange that it no longer works. Are there two zencoding plugins?
@MrMartineau || Setup Sublime Text quickly: Find out all you need at https://github.com/mrmartineau/SublimeTextSetup
MrMartineau
 
Posts: 78
Joined: Thu Jul 28, 2011 8:35 am

Re: Adding id's & classes to tags

Postby Cal on Wed Dec 26, 2012 1:53 pm

I miss that feature too. Anybody knows of a replacement plugin ?
Cal
 
Posts: 6
Joined: Sun Aug 14, 2011 4:29 pm

Re: Adding id's & classes to tags

Postby agibsonsw on Wed Dec 26, 2012 6:40 pm

Cal wrote:I miss that feature too. Anybody knows of a replacement plugin ?

I believe the package is now called Emmet.
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
agibsonsw
 
Posts: 901
Joined: Fri Jan 27, 2012 9:11 pm

Re: Adding id's & classes to tags

Postby Cal on Thu Dec 27, 2012 3:11 pm

I have Emmet and this feature isn't part of it.

Anyway just found that "i[tab]" and "cl[tab]" work for me. Don't know if its from Emmet or HTML package though
Cal
 
Posts: 6
Joined: Sun Aug 14, 2011 4:29 pm

Re: Adding id's & classes to tags

Postby agibsonsw on Thu Dec 27, 2012 3:14 pm

Anyway just found that "i[tab]" and "cl[tab]" work for me. Don't know if its from Emmet or HTML package though

You may have installed my HTMLAttributes package :) available via Package Control.
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
agibsonsw
 
Posts: 901
Joined: Fri Jan 27, 2012 9:11 pm

Re: Adding id's & classes to tags

Postby svenax on Fri Dec 28, 2012 12:46 am

Not to put anyone down or anything, but why are people just installing random plugins and then act surprised when they do stuff or screw stuff up for other plugins?
svenax
 
Posts: 155
Joined: Tue Dec 20, 2011 12:47 pm

Re: Adding id's & classes to tags

Postby agibsonsw on Fri Dec 28, 2012 1:05 am

svenax wrote:Not to put anyone down or anything, but why are people just installing random plugins and then act surprised when they do stuff or screw stuff up for other plugins?


I agree with this sentiment. People seem to install too many, and too similar, plug-ins. I would encourage people to explore the great plug-ins that are available, but to then uninstall, or at least disable, those that they won't be using. 10, or perhaps 20, plug-ins seems a reasonable amount to me ;).
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
agibsonsw
 
Posts: 901
Joined: Fri Jan 27, 2012 9:11 pm


Return to General Discussion

Who is online

Users browsing this forum: Yahoo [Bot] and 17 guests