Javascript语法高亮在Eclipse中不工作? [英] Javascript syntax highlighting in Eclipse not working?

查看:134
本文介绍了Javascript语法高亮在Eclipse中不工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用我正在使用的JavaScript代码的语法高亮,所以我通过Eclipse安装了Web Developer Tools和Javascript Developer Tools。我检查了偏好设置,以确保语法突出显示已启用,但似乎不起作用。

I would like syntax highlighting for some Javascript code that I am working with, so I installed "Web Developer Tools" and "Javascript Developer Tools" through Eclipse. I checked the preferences to make sure the syntax highlighting was enabled but it doesn't seem to be working.

我做了一些搜索,似乎对于不是的项目作为Javascript项目创建,语法高亮显示不工作

I did some searching and it seems that for projects that are not created as Javascript projects, the syntax highlighting doesn't work.

其实我不知道如何在该网页上实现解决方案,我不太确定vim是什么。 (我不认为这是文本编辑器)

Actually, I am not sure how to implement the solution on that webpage, I'm not really sure what "vim" is. (I don't think it's the text editor)

有没有另外一种方法可以让这个语法高亮工作?

Is there an alternate way to get this syntax highlighting working?

推荐答案

检查您的文件关联设置,以确保* .js文件默认与JavaScript编辑器相关联。

Check your "File Associations" setting to ensure that *.js files are associated with the JavaScript Editor by default.


  • 窗口>首选项

  • 常规>编辑>文件关联

  • 在文件类型下选择* .js

  • 如果不存在,请在关联编辑器下单击添加...,然后选择内部> JavaScript编辑器

  • 在关联编辑器点击JavaScript编辑器并选择默认按钮

  • Window > Preferences
  • General > Editors > File Associations
  • Under "File types" select "*.js"
  • If not present, under "Associated editors" click on "Add..." and choose Internal > JavaScript Editor
  • Under "Associated editors" click on "JavaScript Editor" and select the "Default" button

如果您正在开发JavaScript视角,应该已经设置。有可能您以不同的角度进行开发,而不具有此关联预设。

If you are developing in the JavaScript perspective, this should already be set. It's possible that you are developing in a different perspective that does not have this association preset.

这篇关于Javascript语法高亮在Eclipse中不工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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