Created this file on Packages/C++/Indentation Rules - Increased.tmPreferences
based on:
-
#26207 Everything you (n)ever wanted to know about indentation in ST3
Indentation Rules - Increased.tmPreferences
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>scope</key>
<string>doccomment.block.c++, comment.block.c++</string>
<key>settings</key>
<dict>
<key>unIndentedLinePattern</key>
<string>.</string>
</dict>
</dict>
</plist>
It solved the preprocessor problem. But is actually it is not a problem because is desired that the preprocessor indentation to be ignored as it is usually is out from the correct scope. Example:
int main()
{
function;
#if def
code;
#endif
morecode;
}
Now only remains the close brace problem:
(that black/gray box/rectangle on the gif is a bug from the gif recorder/compressor)
The brace should unindent on the after the empty line. But Sublime Text does not allow match against them, so we can fix it?