Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Else Indentation Issue #107

Open
bcrotty opened this issue Mar 3, 2015 · 1 comment
Open

Else Indentation Issue #107

bcrotty opened this issue Mar 3, 2015 · 1 comment
Labels

Comments

@bcrotty
Copy link
Contributor

bcrotty commented Mar 3, 2015

2015-03-03 10_47_24-new issue sublimetext_powershell

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 the if above because it's not nested, and indenting it breaks indentation for anything below.

@bcrotty bcrotty changed the title Indentation Issue Else Indentation Issue Mar 3, 2015
@keith-hall
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants