Skip to content

Commit

Permalink
Improved indentation rules for curly braces
Browse files Browse the repository at this point in the history
  • Loading branch information
alsolovyev committed Jan 17, 2021
1 parent a94f9e8 commit e274746
Showing 1 changed file with 26 additions and 14 deletions.
40 changes: 26 additions & 14 deletions Preferences/Indents.tmPreferences
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,35 @@
<dict>
<key>increaseIndentPattern</key>
<string><![CDATA[(?x)
^\s*+
{%-?
\s*+
\b(if|elif|else|for|asyncEach|asyncAll|macro|block|raw|verbatim|filter|call)\b
.*
-?%}
\s*$
(
^.*\{\s*$
)
|
(
^\s*+
{%-?
\s*+
\b(if|elif|else|for|asyncEach|asyncAll|macro|block|raw|verbatim|filter|call)\b
.*
-?%}
\s*$
)
]]></string>
<key>decreaseIndentPattern</key>
<string><![CDATA[(?x)
^\s*+
{%-?
\s*+
\b(endif|endfor|endeach|endall|endmacro|endblock|endraw|endverbatim|endfilter|endcall)\b
.*
-?%}
\s*$
(
^.*\}\s*$
)
|
(
^\s*+
{%-?
\s*+
\b(endif|endfor|endeach|endall|endmacro|endblock|endraw|endverbatim|endfilter|endcall)\b
.*
-?%}
\s*$
)
]]></string>
</dict>
</dict>
Expand Down

0 comments on commit e274746

Please sign in to comment.