8
7

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 5 years have passed since last update.

Sublime Text 3のインデント設定を変更する

Last updated at Posted at 2018-06-12

Sublime Text 3でインデント設定を変更する方法をメモしておきます。

インデント設定をスペース2つ分に変更する

メニューから [Sublime Text] > [Preferences] > [Settings] をクリック。
スクリーンショット 2018-06-12 16.31.34.png

設定ファイルに以下の2行を追加します。

"tab_size": 2,
"translate_tabs_to_spaces": true,

スクリーンショット 2018-06-12 16.32.56.png

tab_sizeはインデントの幅設定。
translate_tabs_to_spacestrueにするとインデントがスペースに、falseだとタブになります。

開いているファイルのインデント設定を変更する

インデント設定はSublime Textのウインドウ右下にも表示されます。
スクリーンショット_2018-06-12_16_36_28.jpg

こちらクリックすると、開いているファイルに対してインデント設定を適用することができます。
スクリーンショット 2018-06-12 16.37.03.png
「Convert〜」でスペースorタブへの一括変換も可能です。

8
7
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
8
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?