I need to format following code
switch(i) {
case 1: {
printf("a");
break;
}
into:
switch(i) {
case 1:
{
printf("a");
break;
}
with keeping the k&r bracket style on other situations. How could I do this?
I have tried --style=kr --indent-cases
regex to replace:
s/\(case.*:\s\+\){/\1\r{/g