Sublime Forum

Don’t include indent in comment in CSS


When I comment a line in CSS, I get this

.example {
/*    color: red; */

instead of this

.example {
    /* color: red; */

How do I get the first behavior?

Besides appearance, this is annoying because it breaks auto-indentation on the line following the commented one.



You can override the tmPreferences file where it sets this behavior:

1 Like


Thank you, this did what I wanted.

In case this is read by anybody like me who isn’t sure how to create this override, I just created a file Packages/User/Comments.tmPreferences with the following content.

<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">