How to stop ST4 inserting extra TABs on ENTER?
Initial state:
![]()
After ENTER is pressed: actual:
![]()
After ENTER is pressed: wanted:
![]()
How?
How to stop ST4 inserting extra TABs on ENTER?
Initial state:
![]()
After ENTER is pressed: actual:
![]()
After ENTER is pressed: wanted:
![]()
How?
Yes, it does.
Here is the reason: before it happens there is this code:
#define X\
{\
}
So, ST4 (or some C/C++ plugin) takes the {} into account and keeps formatting the rest of the code based on the {}, i.e. inserting 1 TAB.
Demo:

Is it a bug/defect?
Something similar was already reported and fixed, maybe it also fixed this use case. Not sure which is the earliest build of ST the fix was included in though