LoginSignup
15

More than 5 years have passed since last update.

AtomエディタでPHP(+HTML)がシンタックスハイライトされないのを解消

Posted at

Atomエディタで、拡張子 .php でもHTMLが混ざっている場合、シンタックスハイライトがHTMLになってしまってPHP部分がハイライトされない場合があるので、それを解消。

file-types プラグインを入れる

まず 「file-types」プラグイン が必要。

config.cson を編集

設定画面から Open Config Folder を開き、config.cson を編集する。
2015-06-25_115425.png

末尾に以下の2行を追記。

config.cson
  ...
  "file-types":
    php: "text.html.php"

これで拡張子「.php」のファイルはPHPとして扱われると思う。
(公式対応してほしい・・・)

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
15