Sublime Forum

CSS: Issues while coding LESS

#1

When coding CSS, the app auto-populates a semicolon when a colon is typed. This is an issue that was not present before when coding LESS

1.Set syntax to CSS
2. Type &:
3. A semicolon (:wink: is automatically added. This is an undesirable result while coding CSS.

0 Likes

#2

Add this into your keymap file:

[code] { “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.css - meta.selector.css", "match_all": true },
		{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\}|$)", "match_all": true },
		{ "key": "preceding_text", "operator": "not_regex_contains", "operand": "&", "match_all": false },
	]
},[/code]
0 Likes