Why are my .js files running in gedit from eclipse?

From explorer view in Eclipse, when I try to open a .js file, it starts instead of gedit? When I try to "right-click> open with> text editor", it opens in eclipse, but without color recognition for the syntax.

All other files work fine (html, py, css). It drives me crazy!

UPDATE These are the packages that I currently installed.

  • Eclipse IDE for Java Developers
  • Eclipse Web Developer Tools
  • Javascript Development Tools
  • PyDev for Eclipse
  • Web page editor (optional)
+7
source share
1 answer

Go to the general eclipse settings and find “file associations”. There, make sure that the "JavaScript Editor" is set to * .js. After that, the eclipse should open js files with this editor and cause code highlighting and the like. Keep in mind that those files that you opened with the "right click"> "open with> text editor" can have their own settings and still open in a text editor. Select "default" again to remove this local parameter for the file.

The JavaScript editor is included in the plugins you mentioned!

+8
source

All Articles