Author Topic: Code Folding  (Read 3303 times)

Offline Jimmio92

  • Multiple posting newcomer
  • *
  • Posts: 10
Code Folding
« on: July 31, 2009, 03:12:16 pm »
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

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Code Folding
« Reply #1 on: July 31, 2009, 03:38:52 pm »
No, I think you can't do that. Maybe, change the code style approaches your desire.
Code
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.

Offline Jimmio92

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Code Folding
« Reply #2 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

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Code Folding
« Reply #3 on: July 31, 2009, 04:38: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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Code Folding
« Reply #4 on: July 31, 2009, 04:39:44 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.