-
Notifications
You must be signed in to change notification settings - Fork 49
Closed
Description
When you declare a switch statement with switch[tab], the template looks like this:
switch (variable) {
case 'value':
# code...
break;
default:
# code...
break;
}The code below the case and default is indented. However, when I try to add a new case by pressing return at the end of the first break;, everything stays indented one more to the right than the first case:
switch (variable) {
case 'value':
echo 'hello';
break;
case 2:
echo 'hello';
break;
default:
echo 'hello';
break;
}When I use Command-Option-[ to Indent Line / Section, most of the statement gets flattened and doesn't match the template:
switch (variable) {
case 'value':
echo 'hello';
break;
case 2:
echo 'hello';
break;
default:
echo 'hello';
break;
}I would like the auto-indent to make it look like this:
switch (variable) {
case 'value':
echo 'hello';
break;
case 2:
echo 'hello';
break;
default:
echo 'hello';
break;
}Metadata
Metadata
Assignees
Labels
No labels