PhpStormには、PHPのコード中の一部をPHP以外の言語として扱えるLanguage Injectionという機能があります。 文字列の中にHTMLやSQLを書いたときに自然とハイライトされるアレです。 ちなみにSQLはPhpStormでDBの接続設定を行うとテーブルやカラム名の補完やチェックも行ってくれます。すごい。(実際の設定は割愛します) 通常の文字列中で、自動的に言語の判別をしてくれるのはHTMLやSQLの一部の言語だけで、それら以外は手動でLanguage Injectionを設定することが出来ます。alt + Enterで現れるコンテキストメニューからLanguage Injectionを選択し、候補から選ぶことが出来ます。 シンタックスチェックが行われるのでプレーンテキストではわかりにくかったシンタックスエラーが一目瞭然です。文字列中にHTMLやjavascriptを埋