How to change indentation in Visual Studio Code?

前端 未结 14 1651
臣服心动
臣服心动 2020-12-02 03:47

For every typescript file visual studio code uses an auto indentation of 8 spaces. This is a bit too much for my taste but I can\'t find where to change it.

Maybe it

14条回答
  •  一向
    一向 (楼主)
    2020-12-02 04:34

    Adding on: yes, you can use the bottom-right UI to configure the space settings. But if you have existing code that's not formatted to the new spacing, then you can right-click anywhere within the file and click Format Document. Took me a while to figure this out until I stumbled on this issue.

    Format Document menu

提交回复
热议问题