Skip to content

Reindent all lines - #18958

Merged
Alexandru Dima (alexdima) merged 3 commits into
microsoft:masterfrom
rebornix:Reindent
Jan 23, 2017
Merged

Alexandru Dima (alexdima) merged 3 commits into
microsoft:masterfrom
rebornix:Reindent

Conversation

@rebornix

Copy link
Copy Markdown
Contributor

Reindent all lines based on the language specific indentation rules.

@alexdima

Copy link
Copy Markdown
Member

LGTM

@alexdima

Copy link
Copy Markdown
Member

Peng Lyu (@rebornix) Remember to create a test plan item for this.

@DonJayamanne

Copy link
Copy Markdown
Contributor

Peng Lyu (@rebornix) alexandrudima
Is there anything that I need to do to get this command to do something for Python files?
Currently nothing happens when executing this command for python files.

@rebornix

Copy link
Copy Markdown
Contributor Author

Don Jayamanne (@DonJayamanne) A proper Indentation Rules will do and this is how TypeScript does it https://github.com/Microsoft/vscode/blob/master/extensions/typescript/src/typescriptMain.ts#L195
For your information, Atom has builtin support for Python Indentation https://github.com/atom/language-python/blob/719e4404d2cd25a888a8111c62abd31a22a15ef3/settings/language-python.cson#L7 and you can get an idea from that. But since Python takes tab/spaces seriously, I'll suggest to give it a thorough test.

@DonJayamanne

Copy link
Copy Markdown
Contributor

Peng Lyu (@rebornix) Thanks for the pointers. I already have the onEnter rules, I will just need to re-use them for the indentationRules, along with the decreaseIndent pattern from Atom.
Thanks

@github-actions github-actions Bot locked and limited conversation to collaborators Mar 27, 2020
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.

4 participants