indent_ctor_init

Help
Josh
2012-03-06
2012-11-10
  • Josh

    Josh - 2012-03-06

    This option doesn't seem to work when I try it in UniversalIndentGUI v1.2.0

    What I'd like to do is get my initializer lists like this (spaces instead of
    '.', of course):

    Example::Example() :
    ........S1(0),
    ........S2(0),
    ........S3(0) {
    ....statement;
    }
    

    But no matter what options I put in for

    indent_ctor_init
    

    , it always indents to 4 spaces for S1, S2, and S3 (which visually blends
    with the body of the method, which is what I want to avoid). I've tried
    affecting other settings, but am unable to get the initializer list to the
    format I require.

     
  • Ben Gardner

    Ben Gardner - 2012-03-06

    I'm not aware of an option that changes the indent of the initializers.
    Go ahead and add a feature request.

     
  • Willem D'Haeseleer

    I have the very same problem, no mather what i put for

    # Virtual indent from the ':' for member initializers. Default is 2
    indent_ctor_init_leading                 = 10        # number
    # Additional indenting for constructor initializer list
    indent_ctor_init
    

    I always get the output below. I am using the very latest version from
    uncrustify ( acf6059a97e72b on github ) together with the default config.

    class A : public B
    {
    private:
        typedef B base; 
    public:
        A()
            : m_a(0)
            , m_b(0)
        {
        }
    private:
        INT32 m_a;
        INT32 m_b;
    };
    
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks