2

Currently in C mode, contents of a muli-line arrays are aligned with the brace. eg:

const unsigned int array[4] = {
                               A,
                               B,
                               C,
};

Is there a way to configure cc-mode to use a single indentation in this case?

const unsigned int array[4] = {
    A,
    B,
    C,
};

e.g. if indentation is set to 4 spaces.

1

The following setting makes brace lists use a single indent:

(c-set-offset 'brace-list-intro '+)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.