Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
15
Help us understand the problem. What is going on with this article?
@kijtra

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

More than 5 years have passed since last update.

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として扱われると思う。
(公式対応してほしい・・・)

15
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
15
Help us understand the problem. What is going on with this article?