dmin
dmin

Reputation: 434

How to change default comments pattern in Atom (specifically for CSS)

Is there a way to change the default behavior for comments snippet?
Now after press Ctrl+/ I get this:

p {
  color: #000;
  /*margin: 0;*/
}

But I want this:

p {
  color: #000;
  /* margin: 0; */
}

Upvotes: 2

Views: 472

Answers (1)

Dekel
Dekel

Reputation: 62676

Open your config file (using File -> Config) and add these lines to your config:

'.source.css':
  'editor':
    'commentStart': '/\* '
    'commentEnd': ' \*/'

This will change the default behavior of comments in CSS files from

/*COMMENTED TEXT*/

to

/* COMMENTED TEXT */

Upvotes: 4

Related Questions