User forums > General (but related to Code::Blocks)

Indent on comment with indent lines afterwards?

(1/2) > >>

AraspiK:
* MISLEADING SUBJECT * I had no idea how to put this in words
Sometimes my code goes:

--- Code: ---// LOCAL INCLUDES
    #include "..."
// SYSTEM INCLUDES
    #include <...>
--- End code ---
Or:

--- Code: ---class myClass {
    string var1
    // Lambdas
        std::function<void(void)> func

    public:
        ...
}
--- End code ---
How can I tell C::B to fold the indent stuff after a comment and keep such formatting? VSCode supports this, if anybody wants to know.
PS: My code: https://github.com/AravK/KGB2

oBFusCATed:
Can you please try to explain your problem with more details. I have no idea what you're trying and what it doesn't work.

AraspiK:
I want

--- Code: ---// foo
    string bar;
    foobar fooBar;
--- End code ---
to become

--- Code: ---// foo ...
--- End code ---

ollydbg:

--- Quote from: AraspiK on April 03, 2017, 05:51:39 pm ---I want

--- Code: ---// foo
    string bar;
    foobar fooBar;
--- End code ---
to become

--- Code: ---// foo ...
--- End code ---

--- End quote ---
I still don't understand what's the problem you have. Can you give more details? What is the current/exprect way, what is the steps to reproduce this error.

blauzahn:
sounds like he wants code-regions like in C# where you can fold away all the crappy stuff under the rug.

Whether that is a good technique is IMHO debatable. If you feel it being necessary when
dealing with big classes it may be time to think about splitting it because it probably plays
more than one role.

Navigation

[0] Message Index

[#] Next page

Go to full version