How do I make a default syntax by filetype in Atom text editor?

前端 未结 7 585
暗喜
暗喜 2021-01-31 02:17

I want my .ejs files to have html syntax, however, it always opens the files as Plain Text.

In sublime you can choose \"Open all with current extension as...\" then ch

7条回答
  •  生来不讨喜
    2021-01-31 02:37

    For example if you want to open all .jsx files with javascript syntax, you need to add this to your config.cson

    "*":
      core:
        customFileTypes:
          "source.js": [
             "jsx"
          ]
    

    This maps all .jsx files to open with js syntax.

提交回复
热议问题