how do i get eclipse to interpret .ejs files as .html?

后端 未结 3 842
滥情空心
滥情空心 2021-02-13 00:54

i recently started on a node project and two of the modules i\'m using is express and EJS. but default i usually use eclipse as my IDE, it works well for java and decent for htm

相关标签:
3条回答
  • 2021-02-13 01:31

    For me, the best way has been:

    Windows > Preferences > General > Content types

    In window Content types i've selected Text > HTML

    and window File associations click Add... and i've included *.ejs

    0 讨论(0)
  • 2021-02-13 01:34

    For a specific file, try right-click, Open With -> Other... -> HTML editor. You can also set the file association globally under Window -> Preferences -> General -> Editors -> File Associations.

    On a Mac, the global setting is under Mac Option -> Preferences and all the same options.

    0 讨论(0)
  • 2021-02-13 01:51

    As an addendum to rlegendi's answer, if you'd also like the proper html coloring, you need to go to "Content Types" (right above "Editors" in the Preferences). From here, select Text -> HTML and click on "Add..", including .ejs

    0 讨论(0)
提交回复
热议问题