Last active
August 29, 2015 14:22
-
-
Save evoactivity/1bc82f822cd3508f64a4 to your computer and use it in GitHub Desktop.
Key Bindings to help write well formed css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"keys": [":"], | |
"command": "insert", | |
"args": {"characters": ": "}, | |
"context": [ | |
{ | |
"key": "selector", | |
"operator":"equal", | |
"operand":"source.scss" | |
}, | |
{ | |
"key": "preceding_text", | |
"operator": "regex_match", | |
"operand": "^(?<!.|@|#|&)(\\s*)([a-zA-Z0-9\\-_]*)", | |
"match_all": true | |
} | |
] | |
}, | |
{ | |
"keys": ["{"], | |
"command": "insert_snippet", | |
"args": {"contents": " \\{\n\t$0\n\\}\n"}, | |
"context": [ | |
{ | |
"key": "selector", | |
"operator":"equal", | |
"operand":"source.scss" | |
}, | |
{ | |
"key": "preceding_text", | |
"operator": "regex_contains", | |
"operand": "[a-zA-Z0-9)]$", | |
"match_all": true | |
} | |
] | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Updated to better match when to add a space after :