[Sublime Text 2] インデント(Indent)の設定方法
- 2012 5/27
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 } |
以上です。