rtty21: do know the exact steps to reproduce the problem?
STEPS:
1. turn on Smart Indent
2. type in an if/while/for/dowhile/switch statement in codeblocks like so:
3. then add a left surly bracket:
4. then add a newline and your cursor will be where the pipe is here (two indents to the right of the if statement):
if( my_variable == 0){
|
}
I would like the cursor to be here (one indent to the right of the if statement):
if( my_variable == 0){
|
}
does anyone know how to configure this in such a manor as to only have Smart Indent indent once for if/while/for/do-while/switch-case statements?
I would be very happy if I could be given a push in the right direction. :)
I have searched google to no avail. :(
wrong place... you'd have to search the code for this:)
Do you have brace-completion enabled?
Does it happen every time?
I don't really like brace completion.
nevertheless, i tried it.
it fixes the problem with if/switch-case/while/do-while/for statements, but it then screw up smart indentation for function definitions :(
function definitions will not have any indents when i enable brace-completion. it looks like this:
void my_function(int x, int y){
|
}
where the pipe is where my cursor is placed by default.
Thanks for the suggestion. I guess I would rather manually fix a function each time rather than a control statement each time seeing as how i'll definitely be writing a lot more of the latter.
that being said, it would be nice for this to function as I am describing it. Or, to be a little narcissistic, it would be nice to be able to fully configure this.