Little annoying bug when creating a class
only in SCSS files. CSS files are not affected: When I create a space to write the first property, it supposed to create 2 spaces. In SCSS files, only one is created. Gif of the bug:
ST4 won't create double spaces in a class in SCSS files
artik
#1
0 Likes
Same like the previous one you opened. CSS package has a key binding to do it.
Here is the modified key binding that works for sass files (again changing the selector
context)
// Expand {|} to { | } when space is pressed
{ "keys": [" "], "command": "insert_snippet", "args": {"contents": " $0 "}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "source.scss - meta.selector.css", "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
]
},
2 Likes
artik
#3
Ok my bad. Tought was a bug because ST3 is not affected by this behavior, and it was also different between .css
and .scss
files. All fixed.
0 Likes