MarioRicalde / SCSS.tmbundle

The TextMate SCSS Official Bundle. Now Compatible with SublimeText2.
834 stars 110 forks source link

When adding & and pseudo class, semicolon is added #124

Closed ultimatedelman closed 11 years ago

ultimatedelman commented 11 years ago

When I want to create a pseudo-class or selector, it adds a semicolon unnecessarily at the insertion of a colon. For instance, typing in the following:

#mydiv {
    &:
}

when the colon is entered it is followed automatically by a semicolon. Preferably, it should detect if there is an ampersand in front of the colon and not insert a semicolon in this instance. In fact, if it inserted brackets instead, that'd be awesome.

Auto semicolon insertion is great for attributes, but not for nested rules.

FWIW, I'm on windows.

stephenway commented 11 years ago

Actually I'm glad someone brought this up because ever since I picked up sass I remember stumbling on the extra semicolon. Maybe I could treat ampersands as special rule? Anyone have thoughts on this?

pyronaur commented 11 years ago

Well the extra semicolon also clashes with Emmet, Zen-Coding , although I've gotten used to type pos-a instead of pos:a, so it's not a deal-breaker. Anyhow, I think removing the extra semicolon would be the best way to go. We can add that semicolon ourselves, can't we ?

For example I have a bind on cmd + shift + ; which automatically jumps to the end of the line, adds a semicolon and moves onto a new line (as demonstrated on Tuts+ http://webdesign.tutsplus.com/tutorials/workflow-tutorials/quick-tip-banish-repetitive-tasks-with-sublime-text-2-macros/ ), which I believe should really be the way to go here as well.

Maybe someone would like to have a comment that looks like this

/* :::::::: Yo :::::::: */

Again, the SCSS package would just ruin that.

My 25cents say remove it.

pyronaur commented 11 years ago

This is not a question! It is a real issue and please, please clean it up.

stephenway commented 11 years ago

Closing because of my decision to remove the semicolon New PR is needed.