Getting Eclipse to open .html in text-editor by default?

user1438003 picture user1438003 · Aug 6, 2012 · Viewed 30k times · Source

Eclipse Juno keeps opening my HTML files in a embedded web-browser, rather than in an embedded syntax-highlighting editor.

I have installed:

  • Web Page Editor
  • Eclipse Web Developer Tools
  • PyDev for Eclipse

Specifically see the screenshot of my install applications.

I need it to work with Django templates + any other Python templates with HTML + normal HTML+JS files.

How do I find this editor, and select it as default?

Answer

Gilbert Le Blanc picture Gilbert Le Blanc · Aug 6, 2012

Select Window -> Preferences from the main Eclipse menu.

Select General -> Editors -> File Associations from the Preferences menu.

enter image description here

For .htm and .html, left click on the extension in the upper view. Left click on the Add button to the right of the lower view to add one or more HTML editors. Left click on your favorite HTML editor and left click on the Default button to make it the default editor.

If the extension you want is missing, left click on the Add button to the right of the upper view to add the extension.