タグ : ST2

[Sublime Text] インデント(indent)に縦線を引く設定

Sublime Text2で、インデント(indent)に縦線を引く設定を教えてもらいました。

"draw_indent_guides": true,
"indent_guide_options": ["draw_normal", "draw_active"]

上記の設定を、[Preferences] → [Settings – User] から開くJSONファイルに追加するだけです。


参考情報

Sublime Textで今いるインデントに縦線を引く | Border/memo

[Sublime Text 2] インデント(Indent)の設定方法

Sublime Text 2 でインデント(Indent)を設定する方法を調べたのでメモ。

設定は、Sublime Text 2 → Preferences 内の「Settings – Default」の Preferences.sublime-settings を編集するのではなく、「Settings – User」に設定を書いてオーバーライドすることを推奨していました。

// While you can edit this file, it's best to put your changes in
// "User/Preferences.sublime-settings", which overrides the settings in here.
//
// Settings may also be placed in file type specific options files, for
// example, in Packages/Python/Python.sublime-settings for python files.

よって、「Settings – User」でファイルを開いて、下記の内容を追記しました。

tabキーで「半角スペース2つ」に設定しました。

{
    // The number of spaces a tab is considered equal to
    "tab_size": 2,
 
    // Set to true to insert spaces when tab is pressed
    "translate_tabs_to_spaces": true
}

以上です。