Open bcrotty opened 9 years ago
This package doesn't currently provide any indentation rules, so the ones from ST's Default package are used - and they don't cope with elseif
, as you've experienced. There is some documentation for indentation rules at http://docs.sublimetext.info/en/latest/reference/metadata.html#indentation-options-children-of-settings.
It may be possible to borrow some rules from similar languages like C#, if anyone is interested in making a PR here: https://github.com/sublimehq/Packages/blob/2bc05081783362241cc0a46692a84a094ea5b9ec/C%23/Indentation.tmPreferences
The construction on the left breaks automatic indentation (in PowerShell only). It should look like the middle version after a Reindent, and the right version is a workaround. I'm not sure what's causing this or what ST uses to determine indentation.
else
should be indented the same as theif
above because it's not nested, and indenting it breaks indentation for anything below.