Skip to content

Commit

Permalink
Merge pull request #116 from danro/new
Browse files Browse the repository at this point in the history
New
  • Loading branch information
braver authored Nov 20, 2018
2 parents 0174335 + d410b1f commit c809a43
Show file tree
Hide file tree
Showing 71 changed files with 1,525 additions and 378 deletions.
2 changes: 1 addition & 1 deletion Comments.tmPreferences
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<key>name</key>
<string>Comments</string>
<key>scope</key>
<string>source.css.less</string>
<string>source.less</string>
<key>settings</key>
<dict>
<key>shellVariables</key>
Expand Down
48 changes: 48 additions & 0 deletions Default.sublime-keymap
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
[
{ "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.less - meta.selector.css", "match_all": true },
{ "key": "preceding_text", "operator": "not_regex_match", "operand": "^.*:", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\}|$)", "match_all": true }
]
},
{ "keys": [";"], "command": "move", "args": {"by": "characters", "forward": true}, "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.less - meta.selector.css", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^;", "match_all": true }
]
},
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "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.less - 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 }
]
},

// 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.less - 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 },
]
},
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "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.less - 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 changes: 1 addition & 1 deletion Indentation Rules.tmPreferences
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<key>name</key>
<string>LESS Indent</string>
<key>scope</key>
<string>source.css.less</string>
<string>source.less</string>
<key>settings</key>
<dict>
<key>decreaseIndentPattern</key>
Expand Down
Loading

0 comments on commit c809a43

Please sign in to comment.