How to set default editor tab in Eclipse?

guerda picture guerda · Jul 12, 2010 · Viewed 37.8k times · Source

I'm using the HTML editor resp. the Structured Text Editor in Eclipse. It always opens in the tab Visual/Source:

Editor tabs

Is it possible to tell Eclipse it should always open this editor in the Source tab?

Answer

Mohsen picture Mohsen · Sep 2, 2010

You seem to use a plugin which associates with HTML files. For example Eclipse normally loads XML files for the first time with Design tab, and once you switch to source tab, it remembers the next time to open any document associated with XML Editor in Source tab. I don't know remembering is up to Eclipse or up to the plugin associated with the file, but a quick workaround would be:

  1. to right click on the HTML file in package explorer > Open With > choose another editor (e.g. text editor). This only associates with current file. If you want to change file association for all HTMLs:
  2. goto Preferences (under menu Window) > General > Editor > File Associations and change HTML file association there.