Close bracket doesn't go where I want in the editor

Started by colepc, January 09, 2015, 03:55:17 PM

Previous topic - Next topic

colepc

I don't like a lot of white space on the left for my C code. When an open bracket is used I like to align everything associated with it 1 space to the right (I figured out how to change the default of using a tab of 4 spaces to the right to not using tabs and using just 1 space to the right). After the close bracket I like to go back one space to the left. However every time I enter a close bracket it automatically jumps to the left so I have to arrow back and push the space bar to get the close bracket back where I like it. I don't want it to do that. I want it to align with what is above it just like every other new line added does.
Example of what I want:
while(x>y){
Do this;
}

Example of what I don't want:
while(x>y){
Do this;
}

Is there a preference setting to stop the close bracket from automatically jumping
back to the left?

TimoVJL

Tools -> Options -> Tabs

Perhaps Auto indent, Block suits to you.

May the source be with you

colepc

OK, this was a stupid question  :-[. Turns out it isn't a Pelles C question at all. It was a question about Notepad++ which is an editor for writing C programs that I'm using. Does Pellas C have a C editor? If it does, I'll ask the question in a different subject unless it has already been asked. If it has been asked direct me to that subject. Thanks.

Bitbeisser

Quote from: colepc on January 11, 2015, 05:44:36 PM
OK, this was a stupid question  :-[. Turns out it isn't a Pelles C question at all. It was a question about Notepad++ which is an editor for writing C programs that I'm using. Does Pellas C have a C editor? If it does, I'll ask the question in a different subject unless it has already been asked. If it has been asked direct me to that subject. Thanks.
Seriously?  :o

Pelle's C has the best C targeted IDE for Windows IMHO, one of the reasons why I am using it ever since I ran into it years ago.

And on a personal note, fully acknowledging that 1TBS is an almost religious topic, you should really reconsider your C formatting choices.
Writing source code should be done in a readable way, even if you do not work on a team project, so for your own benefit. What you seem to try is probably one on the worst ways to format C source code. Whitespace doesn't cost anything but gives you the benefit of making your source code readable...

Ralf