You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
'Reindent Lines' produces different indentation than 'Format Document' in TypeScript #32835
*duplicateIssue identified as a duplicate of another issue(s)bugIssue identified by VS Code Team member as probable bugeditor-autoindentEditor auto indentation issues
Reindent Lines often gets it wrong, Format Document is much more reliable currently (but it does more than reindenting; I often want to just fix the indentation).
Let's track this issue in #19140 which is talking about the same thing. For now, you can set editor.autoIndent to false to avoid indentation adjustment and probably turn on formatting for tying or saving.
Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for existing issues here. See also our issue reporting guidelines.
*duplicateIssue identified as a duplicate of another issue(s)bugIssue identified by VS Code Team member as probable bugeditor-autoindentEditor auto indentation issues
Activity
borekb commentedon Aug 19, 2017
Oh, just found this issue: 'reindent all lines' removes leading space in comment #19142. This is probably a duplicate of it.
borekb commentedon Sep 15, 2017
Another example:
Formatting via Format Document:
Formatting via Reindent Lines:
borekb commentedon Sep 15, 2017
I've updated the original post, this React example shows the issue better.
jonnysamps commentedon Aug 22, 2018
Please fix. Love VSCode but this drives me nuts.
rebornix commentedon Sep 18, 2018
Let's track this issue in #19140 which is talking about the same thing. For now, you can set
editor.autoIndenttofalseto avoid indentation adjustment and probably turn on formatting for tying or saving.rebornix commentedon Sep 18, 2018
Borek Bernard (@borekb) your feedback and reproduce steps will be considered even this issue is closed.
vscodebot commentedon Sep 18, 2018
Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for existing issues here. See also our issue reporting guidelines.
Happy Coding!