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

前端 未结 7 587
暗喜
暗喜 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:35

    Edit: since the time I wrote this answer, this functionality has been added to Atom core, see this answer for details.

    file-types Atom package

    (https://atom.io/packages/file-types)

    It does exactly what the title question asks for: you can define new file extensions for existing languages with a simple edit of the config.cson file.

提交回复
热议问题