Skip to content

Commit

Permalink
Fixes #45 - Single-asterisk block comments are automatically closed. …
Browse files Browse the repository at this point in the history
…An asterisk at the start of one of these lines will be aligned nicely
  • Loading branch information
spadgos committed Jun 5, 2012
1 parent 77f6e88 commit d725261
Showing 1 changed file with 21 additions and 9 deletions.
30 changes: 21 additions & 9 deletions Default.sublime-keymap
Expand Up @@ -33,15 +33,15 @@
{ "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "\n${TM_CURRENT_LINE/^\\s*(\\*\\s*).*$/$1/}"}, "context":
[
{ "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true },
{ "key": "selector", "operator" : "equal", "operand" : "comment.block", "match_all": true},
{ "key": "selector", "operator": "equal", "operand" : "comment.block", "match_all": true},
{ "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\*\\s*\\S", "match_all": true }
]
},
{ "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "\n${TM_CURRENT_LINE/^\\s*(\\*\\s*).*$/$1/}"}, "context":
[
{ "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true },
{ "key": "selector", "operator" : "equal", "operand" : "comment.block", "match_all": true},
{ "key": "selector", "operator": "equal", "operand" : "comment.block", "match_all": true},
{ "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true },
{ "key": "setting.trim_automatic_white_space", "operator": "equal", "operand": false },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\*", "match_all": true }
Expand All @@ -50,7 +50,7 @@
{ "keys": ["enter"], "command": "jsdocs_trim_auto_whitespace", "context":
[
{ "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true },
{ "key": "selector", "operator" : "equal", "operand" : "comment.block", "match_all": true},
{ "key": "selector", "operator": "equal", "operand" : "comment.block", "match_all": true},
{ "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true },
{ "key": "setting.trim_automatic_white_space", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\*\\s*$", "match_all": true }
Expand All @@ -60,9 +60,21 @@
[
{ "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true },
{ "key": "setting.jsdocs_extend_double_slash", "operator": "equal", "operand": true, "match_all": true},
{ "key": "selector", "operator" : "equal", "operand" : "comment.line.double-slash", "match_all": true},
{ "key": "selector", "operator": "equal", "operand" : "comment.line.double-slash", "match_all": true},
{ "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true },
{ "key": "preceding_text", "operator" : "regex_contains", "operand": "^\\s*\\/\\/", "match_all": true}
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\/\\/", "match_all": true}
]
},
{ "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "\n$0\n */"}, "context":
[
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true},
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\/\\*$", "match_all": true}
]
},
{ "keys": ["*"], "command": "insert_snippet", "args": {"contents": " *"}, "context":
[
{ "key": "selector", "operator": "equal", "operand": "comment.block", "match_all": true},
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*$", "match_all": true}
]
},
{ "keys": ["enter"], "command": "jsdocs_deindent", "context":
Expand All @@ -88,7 +100,7 @@
{ "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "\n${TM_CURRENT_LINE/^\\s*(\\*\\s*).*$/$1/}"}, "context":
[
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
{ "key": "selector", "operator" : "equal", "operand" : "comment.block", "match_all": true},
{ "key": "selector", "operator": "equal", "operand" : "comment.block", "match_all": true},
{ "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\*", "match_all": true }
]
Expand All @@ -97,16 +109,16 @@
[
{ "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true },
{ "key": "setting.jsdocs_extend_double_slash", "operator": "equal", "operand": true, "match_all": true},
{ "key": "selector", "operator" : "equal", "operand" : "comment.line.double-slash", "match_all": true},
{ "key": "selector", "operator": "equal", "operand" : "comment.line.double-slash", "match_all": true},
{ "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true },
{ "key": "preceding_text", "operator" : "regex_contains", "operand": "^\\s*\\/\\/", "match_all": true}
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\/\\/", "match_all": true}
]
},
{ "keys": ["@"], "command": "run_macro_file", "args": {"file": "Packages/DocBlockr/jsdocs-auto-complete.sublime-macro"}, "context":
[
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*(?:\\*|\\/\\*{2})\\s*$", "match_all": true },
{ "key": "selector", "operator" : "equal", "operand" : "comment.block", "match_all": true}
{ "key": "selector", "operator": "equal", "operand" : "comment.block", "match_all": true}
]
},
{ "keys": ["tab"], "command": "jsdocs_indent", "context":
Expand Down

0 comments on commit d725261

Please sign in to comment.