News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Code Folding

Started by Jimmio92, July 31, 2009, 03:12:16 PM

Previous topic - Next topic

Jimmio92

Hello all,
I know Code::Blocks has code folding (wxScintilla I believe), but I was wondering if I can customize it so the start bracket doesn't show.

For example, my code resembles:
if(stuff)
{
    stuffs;
}
and I'd really love to not see an opening bracket going to seemingly no where.

Thanks in Advance,
Jimmi

ollydbg

No, I think you can't do that. Maybe, change the code style approaches your desire.

if(stuff){
    stuffs;
}


At this time, you can save one line more.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Jimmio92

Sorry, I'm not changing my coding style just to save a line. I'll just have to learn to deal with it I guess.

-Jimmi

MortenMacFly

Quote from: Jimmio92 on July 31, 2009, 04:34:55 PM
I'll just have to learn to deal with it I guess.
...just like several million other devs, too I guess. ;-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

ollydbg

Quote from: Jimmio92 on July 31, 2009, 04:34:55 PM
Sorry, I'm not changing my coding style just to save a line. I'll just have to learn to deal with it I guess.

-Jimmi

I have just tested in Notepad++ which also use Scintilla control. But it still let the "open brace { "  seen.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.