Sublime Forum

General Pluggin like Emmet HTML Multiplication

#1

First, post sorry if this answer is well known, but I could not think about how to search for such a thing.

I really like Emmet and the HTML Multiplication syntax is way cool! Was trying to see if it worked for CSS to add multiple selectors. It seems it does not and the curly bracket may pose a problem. I could see other times I might want to put in repeating text besides the CSS example here.

Emmet example for list element. ul>li.item$$$*5

Maybe this could happen on from an input command or something or could pass selected string to plugin
General idea would be to enter a string like “.image$$ {\n\theight: 100%;}\n” 3 to repeat.

output:

.image01 {
height: 100%;
}
.image03 {
height: 100%;
}
.image03 {
height: 100%;
}

Seems like this may have been done, if not might be something I could pull off after watching Terence’s plugin tutorial.

0 Likes

#2

Emmet 2 (see: https://packagecontrol.io/packages/Emmet) claims to support CSS.

If something doesn’t work as expected or if you have feature requests it may be worth opening an issue on its github repo.

0 Likes

#3

Emmet supports CSS and has nice features just not the Multiplication function like HTML (as far as I can tell). My question was not really Emmet specific. May not have explained my question well.

0 Likes

#4

I know the Emmet author to be happy about feedback. Maybe your feature can be implemented with little effort. Hence it may be worth adding a feature request at Emment’s github page.

Don’t know about other plugins doing something like that, so that might be your best chance.

0 Likes