Answer the question
In order to leave comments, you need to log in
How to change SublimeText settings?
Good afternoon!
Please tell me how to change the SublimeText settings so that when creating a CSS rule, the closing curly brace does not wrap to the next line, but stays on the same line as the last property written. I don't remember what this style is called.
Now like this:
p {
color: blue;
font-size: 16px;
}
p {
color: blue;
font-size: 16px; }
Answer the question
In order to leave comments, you need to log in
Go to the menu item Preferences - Key Bindings and place the following code in the User section:
{ "keys": ["enter"], "command": "insert", "args": {"characters": "\n\t"}, "context":
[
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "source.css" }
]
}
{
behavior will be similar. As in the case of empty brackets:.test {
}
.test // нажимаем здесь {
width: 40px;
.test {
width: 40px;} // автоматически подставляется }
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question