LoginSignup
13
6

More than 3 years have passed since last update.

vscodeで.tpl拡張子をhtmlに関連付ける

Posted at

phpにはsmartyというテンプレートエンジンがありますが、vscodeで.tplファイルを開くと紐付けが出来ておらず、シンタックスハイライトされないと思いますので、関連付け方を記載させて頂きます。

1. setting.jsonを開く

macの場合の操作ですが、Command + , で設定画面を開いて下さい。

setting.png

上記右上のアイコンをクリックすると、setting.jsonが開きます。

2. setting.jsonへ記述

setting.jsonへ以下を記述して保存して下さい。

    "files.associations":
    {
        "*.tpl": "html",
    }

上記で.tplファイルもハイライトされるはずです。
※変わらない場合はvscodeの再起動を試して下さい。

13
6
0

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
13
6