Skip to content
This repository has been archived by the owner on Nov 5, 2021. It is now read-only.

Add auto-indentation for python #33

Merged
merged 1 commit into from
May 29, 2018

Conversation

masad-frost
Copy link
Contributor

@masad-frost masad-frost commented May 17, 2018

Adds rules for auto indent using onEnterRules.

Q: I Initially tried using indentationRules but decreaseIndentPattern seemed tricky in python. Any reason to use one over the other?

@alexdima
Copy link
Member

indentationRules are much more advanced then onEnterRules. They are used when moving lines, when pressing Tab, when pressing Enter, or when executing commands to re-indent the file. They should describe the indentation rules of a language completely. I don't know a good place where they are documented, perhaps @rebornix knows.

The onEnterRules are simply used when one presses Enter, but are easier to get right.

@masad-frost
Copy link
Contributor Author

Cool, I played with it a little, and I think I get it. Thakns!

@alexdima alexdima merged commit c09fd5d into microsoft:master May 29, 2018
@masad-frost masad-frost deleted the fm-py-indent branch May 30, 2018 22:56
@alexdima alexdima added this to the July 2018 milestone Aug 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants