Sublime Text 2: Auto complete CSS classes in HTML

user1995781 picture user1995781 · Oct 4, 2013 · Viewed 7.9k times · Source

How can I have the CSS auto-complete for classes feature in Sublime Text 2?

For example, I have included a CSS file in my HTML document

link rel="stylesheet" href="css/style.css"

In CSS I have this:

.container-primary {
    border: 1px solid #DDDDDD;
    float: left;
    font-size: 12px;
        height: 115px;
    line-height: 1.4;
    margin: 0 -1px -1px 0;
    padding: 10px;
    text-align: center;
    width: 800px;
}

How can I have the auto-complete for the CSS class when I applying the class in the HTML?

<div id="content" class="container-primary"></div>

Thanks.

Answer

soycharliente picture soycharliente · Nov 27, 2013

Sublime Text 2 doesn't have support for that out of the box. SublimeAllAutocomplete extends the default autocomplete to find matches in all open files.