User forums > Help
Indenting 8 spaces
MortenMacFly:
--- Quote from: thomas on February 04, 2012, 05:12:40 pm ---Maybe in 20 or 30 years from now, people will have learned that a tab and 4 space characters are not the same, and that spaces are not for indenting.
--- End quote ---
This really depends on you habits. I for example seriously hate tabs because in every single editor with obscure and always different settings it screws your intended indention. I am just sick of setting the "how to interpret tabs" option in every fucking editor. Then, you show it to your mate and again its screwed because he has different settings, too. So, just use a courier (fixed) font type and spaces work the same on all editors and all platforms.
oBFusCATed:
--- Quote from: korwynkim on February 04, 2012, 04:38:31 pm ---It only seems to happen with control structures. I don't have brace completion enabled. If i put an opening brace on the same line as the control statement and press enter, the caret will be indented 8 spaces on the next line. This only happens the first time. If I go back to the opening brace and press enter, the caret indents correctly.
--- End quote ---
Yes, this is the behaviour, I'm seeing, too.
Do you mean that C::B indents 8 spaces relative to the beginning of the if/for/while?
rtty21:
I am having this problem as well.
I finally got around to upgrading to 12.11 and I was overjoyed that the auto code completion had been tinkered with and the bugs had been worked out. :)
All was going well until I discovered that the Smart Indent feature now indents twice ( it places two tabs (8 spaces) instead of just one tab (4 spaces) ).
Does anyone know how to make it only indent once instead of indenting twice?
I would really appreciate anyone who could tell me because I really like the feature when it is only indenting once :)
Thanks for taking the time to read my post :)
Jensen
oBFusCATed:
rtty21: do know the exact steps to reproduce the problem?
rtty21:
--- Quote from: oBFusCATed on December 28, 2012, 06:37:17 pm ---rtty21: do know the exact steps to reproduce the problem?
--- End quote ---
STEPS:
1. turn on Smart Indent
2. type in an if/while/for/dowhile/switch statement in codeblocks like so:
--- Code: ---if( my_variable == 0)
--- End code ---
3. then add a left surly bracket:
--- Code: ---if( my_variable == 0){
--- End code ---
4. then add a newline and your cursor will be where the pipe is here (two indents to the right of the if statement):
--- Code: ---if( my_variable == 0){
|
}
--- End code ---
I would like the cursor to be here (one indent to the right of the if statement):
--- Code: ---if( my_variable == 0){
|
}
--- End code ---
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. :(
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version