In vscode, if I put a comma in an element, it aligns vertically.
It seems to have happened since I installed black in Python.
css is also vertically aligned.
How do I put this exception?
For example, if about 80 characters are exceeded,
it would be good to move to the next line.
Python
alphabet = [
"a",
"b",
"c",
"d",
"e",
"f",
"g",
"h",
"i",
"j",
"k",
"l",
"m",
"n",
"o",
"p",
"q",
"r",
"s",
"t",
"u",
"v",
"w",
"x",
"y",
"z",
"a",
"b",
"c",
"d",
"e",
"f",
"g",
"h",
"i",
"j",
"k",
"l",
"m",
"n",
"o",
"p",
"q",
"r",
"s",
"t",
"u",
"v",
"w",
"x",
"y",
"z",
]
CSS
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: "Montserrat";
}
2
Answers
Check your VS Code extensions for
prettier-code formatter
.If it is enabled then disable it. Prettier is an opinionated code formatter and is adding whitespace to your selector list as this is a convention for CSS selector lists.
Adding the following code to your
settings.json
: