Sublime Forum

Some problems resolving [tag].[class] format in HTML

#1

First of all, sorry if I make mistakes; I’m not a good English writer but I’ll do my best.
I have two problems:

  1. When I write any tag with a class like div.row and then press the Tab button, SublimeText resolve it perfectly adding “<div class="row"></div>”.
    But after I press “Enter” to go between those tags I’m not able to do the same instantly (for example with another “div.col”) becouse when I press the “Tab” button, SublimeText doesn’t do the same thing than with the first “div” tag (I mean, put <div class="col"></div>).

  2. When I write a tag with a class like “div.col-xs-12” (which is a Bootsrap class), SublimeText doesn’t resolve it. And I think the cause is the second “-” because if I try “div.col-xs” for example, SublimeText resolve it well.

Thanks for reading!

0 Likes

#2

probably you will want to tweak this regex: https://github.com/sublimehq/Packages/blob/446c81130cc3aab712a21f8d6658be70bc418bb3/HTML/html_completions.py#L323

0 Likes

#3

In case it helps, many people use the Emmet package for these HTML expansions, which may work the way you want

1 Like