How do I change the indentation for switch?
Many people want to indent their switch statements like this:
bash
f()
{
switch(x) {
case A:
x1;
break;
case B:
x2;
break;
default:
x3;
}
}To achieve this, add the following line to your init file (see How do I set up an init file properly?):
emacs-lisp
(c-set-offset 'case-label '+)