Skip to content

Commit

Permalink
Fix caret being auto-indented when hitting enter between tags
Browse files Browse the repository at this point in the history
  • Loading branch information
deathaxe committed Oct 23, 2024
1 parent ee57770 commit cf7d6f8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Default.sublime-keymap
Original file line number Diff line number Diff line change
Expand Up @@ -236,5 +236,17 @@
{ "key": "preceding_text", "operator": "regex_contains", "operand": "{{ $", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^ }}", "match_all": true }
]
},
{
"keys": ["enter"],
"command": "run_macro_file",
"args": {"file": "res://Packages/Default/Add Line in Braces.sublime-macro"},
"context": [
{ "key": "selector", "operand": "meta.template.jinja - source.jinja" },
{ "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": "%\\}\\s*$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\{%", "match_all": true }
]
}
]

0 comments on commit cf7d6f8

Please sign in to comment.