css - Change Sublime Text Bracket/Indent Rules -
css - Change Sublime Text Bracket/Indent Rules -
i'm trying figure out how alter sublime texts auto bracket rules css.
i default:
.class { #cursor } i have this:
.class { #cursor} any ideas on how accomplish this?
you can add together shortcut key bindings - user:
{ "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" } ] } to modify enter key behaviour css files.
or can utilize snippet. tools/new snippet...:
<snippet> <content><![cdata[ { ${1}} ]]> </content> </snippet> save packages/user/cssbrackets.sublime-snippet.
then, add together shortcut in key bindings - user trigger when pressing { in css files:
{ "keys": ["{"], "command": "insert_snippet", "args": {"name": "packages/user/cssbrackets.sublime-snippet"}, "context": [ { "key": "selector", "operator": "equal", "operand": "source.css" } ] } css editor sublimetext2
Comments
Post a Comment