Skip to main content
edited tags
Link
Drew
  • 79.1k
  • 10
  • 123
  • 257
Source Link

How to reduce enum definition indentation?

With my actual configuration, an enum definition looks like this:

enum    Toto
    {
        foo,
        bar
    }

Spaces are by packs of 4 instead of 2 because I set 4 as default indentation space for C/C++.

I would like to align brackets with enum keyword WITHOUT reducing space between them and enum list, like this:

enum    Toto
{
    foo,
    bar
}

I already done a similar thing by totally canceling namespace indentation, with the following Elisp line:

(c-set-offset 'innamespace 0)

But I don't know if something similar is possible for enum.