Topic : Configuring Auto-Indentation

Forum : Ride IDE

Original Post
Post Information Post
January 19, 2009 - 9:21pm
Guest

Hi fellow programmers:

Does anybody know how to configure the RIDE environment (for C and H files) so that the auto-indentation of braces can be changed to a different style?

At the moment, after an "if" statment, the next press of the return key indents the opening brace by one tab stop. Furthermore, after a closing brace, the next press of the return key outdents the cursor by one tab stop. For example, by pressing return after each line of code, entered as shown below, the following is generated:

void test(void)
{
u8 data;

if(data > 0)
{
data = 0;
}
++data;
}

Although this auto-indent style is one of the C-styles, I prefer to use the style where the opening brace is lined up with the "if" statment. See the example below for the style I would like to achieve:

void test(void)
{
u8 data;

if(data > 0)
{
data = 0;
}
++data;
}

So, how can I change the RIDE options to achieve the latter style as shown above? Does anybody know? If not, can an option be added to RIDE to provide this configuration option?

Thanks,
Garry.