Tab stops in typescript - do not expand as spaces
In VS you can set the handling of tabs for each file type. VS will expand the tab to the number of spaces you specify when the file is displayed. So it doesn't matter what tab size you specify, the file will look nicely indented - EXCEPT: -- you use the VS option to replace tabs with spaces.
This will cause inconsistent indentations when reading the file with any other default tab stop - in particular, you'll see strange behaviour when the file is displayed in SourceTree
RECOMMENDATION:
For all file types: Use Keep Tabs option as shown below
Comments (3)
-
-
reporter Screen shot of Tools => Options = > Text Editor settings in VS2017.
If we all always use tabs rather than spaces to control indenting, then files will look OK even when rendered with a different tab expansion.
-
- changed status to resolved
Documented in developer guide
- Log in to comment
@softwords there is nothing "shown below" Is this a VS settings we should all use?