I want very simple indentation behaviour and cannot get it. In fact, it applies indentation randomly.
When I press enter, I want my cursor to be at the indentation level of the previous line.
- If the previous line is a comment, indent it to that level.
- If the previous line is an open bracket/brace/parenthesis/angle bracket, indent it to that level.
- If the previous line is 8 spaces, indent it to that level.
- If the previous line is not indented, indent it to that level.
I think C++ syntax might be applying some logic that I don’t want, but can’t find how to fix it, let alone universally.
When I create a new file with no syntax, the indentation behaviour is correct.
Does anyone know how I can figure this out?