{"action":"created","issue":{"url":"https://api.github.com/repos/textmate/php.tmbundle/issues/19","labels_url":"https://api.github.com/repos/textmate/php.tmbundle/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/textmate/php.tmbundle/issues/19/comments","events_url":"https://api.github.com/repos/textmate/php.tmbundle/issues/19/events","html_url":"https://github.com/textmate/php.tmbundle/issues/19","id":2581328,"number":19,"title":"switch statement not auto-indented correctly","user":{"login":"ZevEisenberg","id":464574,"avatar_url":"https://avatars.githubusercontent.com/u/464574?v=3","gravatar_id":"","url":"https://api.github.com/users/ZevEisenberg","html_url":"https://github.com/ZevEisenberg","followers_url":"https://api.github.com/users/ZevEisenberg/followers","following_url":"https://api.github.com/users/ZevEisenberg/following{/other_user}","gists_url":"https://api.github.com/users/ZevEisenberg/gists{/gist_id}","starred_url":"https://api.github.com/users/ZevEisenberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZevEisenberg/subscriptions","organizations_url":"https://api.github.com/users/ZevEisenberg/orgs","repos_url":"https://api.github.com/users/ZevEisenberg/repos","events_url":"https://api.github.com/users/ZevEisenberg/events{/privacy}","received_events_url":"https://api.github.com/users/ZevEisenberg/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2011-12-16T16:20:11Z","updated_at":"2015-06-23T16:23:24Z","closed_at":"2011-12-16T16:39:18Z","body":"When you declare a `switch` statement with `switch[tab]`, the template looks like this:\r\n\r\n```php\r\nswitch (variable) {\r\n\tcase 'value':\r\n\t\t# code...\r\n\t\tbreak;\r\n\t\r\n\tdefault:\r\n\t\t# code...\r\n\t\tbreak;\r\n}\r\n```\r\n\r\nThe 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:\r\n\r\n```php\r\nswitch (variable) {\r\n\tcase 'value':\r\n\t\techo 'hello';\r\n\t\tbreak;\r\n\t\tcase 2:\r\n\t\techo 'hello';\r\n\t\tbreak;\r\n\t\r\n\tdefault:\r\n\t\techo 'hello';\r\n\t\tbreak;\r\n}\r\n```\r\n\r\nWhen I use `Command`-`Option`-`[` to Indent Line / Section, most of the statement gets flattened and doesn't match the template:\r\n\r\n```php\r\nswitch (variable) {\r\n\tcase 'value':\r\n\techo 'hello';\r\n\tbreak;\r\n\tcase 2:\r\n\techo 'hello';\r\n\tbreak;\r\n\t\r\n\tdefault:\r\n\techo 'hello';\r\n\tbreak;\r\n}\r\n```\r\n\r\nI would like the auto-indent to make it look like this:\r\n\r\n```php\r\nswitch (variable) {\r\n\tcase 'value':\r\n\t\techo 'hello';\r\n\t\tbreak;\r\n\tcase 2:\r\n\t\techo 'hello';\r\n\t\tbreak;\r\n\t\r\n\tdefault:\r\n\t\techo 'hello';\r\n\t\tbreak;\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/textmate/php.tmbundle/issues/comments/114562279","html_url":"https://github.com/textmate/php.tmbundle/issues/19#issuecomment-114562279","issue_url":"https://api.github.com/repos/textmate/php.tmbundle/issues/19","id":114562279,"user":{"login":"aaronbauman","id":508451,"avatar_url":"https://avatars.githubusercontent.com/u/508451?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronbauman","html_url":"https://github.com/aaronbauman","followers_url":"https://api.github.com/users/aaronbauman/followers","following_url":"https://api.github.com/users/aaronbauman/following{/other_user}","gists_url":"https://api.github.com/users/aaronbauman/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronbauman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronbauman/subscriptions","organizations_url":"https://api.github.com/users/aaronbauman/orgs","repos_url":"https://api.github.com/users/aaronbauman/repos","events_url":"https://api.github.com/users/aaronbauman/events{/privacy}","received_events_url":"https://api.github.com/users/aaronbauman/received_events","type":"User","site_admin":false},"created_at":"2015-06-23T16:23:24Z","updated_at":"2015-06-23T16:23:24Z","body":"This problem persists to TextMate 2\r\nMaybe there's a way to solve it now?\r\nIs there a current issue open about this?"}}