Add to C/C++

This commit is contained in:
Stephen Sigwart 2023-02-28 21:17:35 -05:00
parent e3cab63a12
commit a99fb2c5c3

View file

@ -30,5 +30,16 @@
"start": "^\\s*#pragma\\s+region\\b",
"end": "^\\s*#pragma\\s+endregion\\b"
}
}
},
"onEnterRules": [
{
// Decrease indentation after single line if/else if/else, for, or while
"previousLineText": "^\\s*(((else ?)?if|for|while)\\s*\\(.*\\)\\s*|else\\s*)$",
// But make sure line doesn't have braces or is not another if statement
"beforeText": "^\\s+([^{i\\s]|i(?!f\\b))",
"action": {
"indent": "outdent"
}
}
]
}