如何让eclipse将.ejs文件解释为.html? [英] how do i get eclipse to interpret .ejs files as .html?

查看:568
本文介绍了如何让eclipse将.ejs文件解释为.html?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近开始一个节点项目,我使用的两个模块是express和EJS。但默认我通常使用eclipse作为我的IDE,它适用于java和体面的html和javascript。但我遇到的一个问题是,对于.ejs文件,我没有标记颜色编码,或任何形式的代码完成。它基本上只是一个简单的文件。



有没有人知道我可以让eclipse将.ejs文件解释为.html文件?我认为这是非常相似的,除了偶尔的嵌入标签。或者一个IDE更适合于node.js / html / ejs开发的推荐。



谢谢!

解决方案

对于特定文件,请尝试右键单击,打开方式 - >其他... - > HTML编辑器。您还可以在窗口 - >首选项 - >常规 - >编辑器 - >文件关联下设置文件关联。



在Mac上,全局设置位于Mac选项 - >首选项之下,所有相同的选项。


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 html and javascript. but one problem i'm having is that for .ejs files i get no markup color coding, or any form of code completion. it's basically just a plain file.

does anyone know how i can get eclipse to interpret .ejs files as .html files? i figure it's pretty similar except for the occasional embed tags. or a recommendation for an IDE more well suited to node.js/html/ejs development.

thanks!

解决方案

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.

这篇关于如何让eclipse将.ejs文件解释为.html?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆