LoginSignup
11
10

More than 5 years have passed since last update.

言語やプロジェクトごとにインデントなどの設定を変える方法

Posted at

言語単位の設定変更

現時点では syntax-settings を使うのが一番良さそうです。

config.csonの記述例:

'syntax-settings':
  'source':
    'perl':
      'editorSettings':
        'tabLength': 4
        'softTabs': 4
  'text':
    'html':
      'php':
        'editorSettings':
          'tabLength': 4
          'softTabs': 4

プロジェクト単位の設定変更

Vimにおける:set ts=4 sw=4 sts=0でカレントバッファの設定を変更、的なことは出来ませんが(たまに欲しい時あるので作ろうかなぁ)、プロジェクト単位で設定を変える方法はいくつかあります。

project-manager

私自身は使ったこと無いのですが、圧倒的star数のプロジェクト管理パッケージです。↓よりもオススメです。

local-settings

拙作。プロジェクトルートに、config.csonの任意の設定を記述した.atomrc.csonというファイルを置き、その設定を現在の設定に上書き適用できるパッケージです。

自分で作っておいてなんですが、使ってないです。

(思ったほどプロジェクトごとに設定変えたいという需要が自分にあまりなかったものでして…。)

11
10
1

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
11
10