How to change indentation in Visual Studio Code?

前端 未结 14 1671
臣服心动
臣服心动 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:41

    You can change this in global User level or Workspace level.

    Open the settings: Using the shortcut Ctrl , or clicking File > Preferences > Settings as shown below.

    Then, do the following 2 changes: (type tabSize in the search bar)

    1. Uncheck the checkbox of Detect Indentation
    2. Change the tab size to be 2/4 (Although I strongly think 2 is correct for JS :))

提交回复
热议问题