0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

VSCodeでTabのインデントがspace2つ分になる時の対処法

Posted at

はじめに

スクリーンショット 2022-04-26 17.32.46.png
いつもは,Tabを押したらインデントがspace4つ分なのに
今回人からもらったファイルをいじっていたらインデントがspace2つ分になったので,どんな時もTabでspace4つになるようにしました.

設定

左下の歯車 → 設定 → Editor: Tab Sizeを4に (デフォルトは4)
スクリーンショット 2022-04-26 17.17.24.png
これだけだと,Tabがspace2つ分になっているファイルを編集しようとしたらspace2つになるっぽいです.
そこで,Editor: Detect Indentation をオフにします.

青文字の「Editor: Detect Indentation」をクリック → チェックを外す
スクリーンショット 2022-04-26 17.24.10.png

これでTab押したらspace4つになりました!
スクリーンショット 2022-04-26 17.33.36.png

おわりに

インデントはspace2つか4つどちらが良いのでしょうか?
私は4つ派です.

参考文献

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?