Adding closing comments after tags


#1

I’ve been using an added feature in my Sublime 3 editor and would like to implement it with Atom.

I’ve seen only one other developer, Brad Schiff, use it. It goes like this.

When the editor closes and HTML tag, it appends a comment to which id or class is being closed. It helps me stay out of trouble. Here’s an example of the editor output->

@if(count($listings))

Company
@endif

And this is the language from Preferences/Package Settings/Settings-User ->

{
// Emmet preferences
// List of all available preferences:
// http://docs.emmet.io/customization/preferences/
“preferences”: {

	// Format the comments after things the way I like - GRB
	"filter.commentAfter": "<!-- <%= attr(\"id\", \"#\") %> <%= attr(\"class\", \".\") %> //-->"
},

"syntaxProfiles": {
	// Enable XHTML dialect for HTML syntax
	// “html”: “xhtml”
	"html" : {

		// force comments to always appear
		"filters" : "html, c"
	}
}

}

Since I didn’t create it I don’t understand how to implement this nifty feature in Atom, does anyone here know?

TIA.
Harry


#2

Atom has an emmet package, too. I expect that you can configure it in the same way.


#3

Yes, I like that Atom has Emmet since I’m so dependent on it. However I looked as best I could but did not see where these type of settings/feature could be implemented. I’ll check again though …


#4

See the packages readme here and the linked emmet documentation within the paragraph for more information on where to put which of your preferences.