Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When using the open file dialog on Eclipse, many file types open in the internal editor as expected (.java, .txt). However, others open in an external editor. For example on my system attempting to open .sh file causes it to open it in emacs, and .py files open in bluefish.

How do I tell eclipse to open all files in the internal editor. I don't want to make an association for each type explicitly; I just want everything to open in the internal editor by default.

share|improve this question
1  
To clarify here, do you mean double clicking a file in Eclipse, or in the OS file explorer? I am having the same problem where all of the files in eclipse are defaulting to the system editor, even when there is a specific editor (e.g. c/c++ for .c files) associated. –  Chris Marasti-Georg Aug 3 '11 at 12:43
1  
@Chris: In eclipse –  Draemon Aug 6 '11 at 13:31
    
@studiohack: care to justify how this isn't a "real question" - I think I've been pretty clear, and the 4 people who have marked it as a favourite probably want a good answer too. –  Draemon Jan 8 '12 at 21:19
    
I don't know why this question was closed. I have the same problem. I click a JAVA!! file in eclipse (Juno) and it opens in a notepad application (default windows handler) –  Ben Sep 4 '12 at 7:08

4 Answers 4

I think I can add to the above content provided by others. Someone might feel it helpful. How to make the text editor in eclipse as default Editor:

  1. on the top pane of Eclipse in the task bar you will see "Window". click on "window" and select "preferences". A small window will be popped-up.

  2. Now in that small popped window got to General->Editors. now Click on File Associations. After clicking on FileAssociations you will see two windows on the right side.

  3. Now please add the file type in the top window. Example say, i want to make text editor as default for some "xxxxx.prop" files. so I clicked on the "Add" button that was beside the top window. It will ask you to type the FileType in a small pop-Up. please type there like "*.prop" and it will get saved and u will see your entered file Type there in the top window.

  4. Now please add the File editors that you want as default for that particular FileType you just added. Example say, On the above step i added ".prop". so please click on the ".prop" that is visible in the top window and right way click on the "Add" button just beside bottom window. it will pop-up to choose your editor, so add ur editor. Eclipse will automatically make it as default, if not please select that editor that you added just now and click on the default button that was just beside that bottom window.

share|improve this answer
    
Please note that "above" has no context here. Answers can be sorted a number of different ways. Your answer could very well be above all of the others. Better to reference other answers with a link, or at least mentioning the author. –  Al E. Jan 20 at 16:18

I have the same pain. You might want to add the extensions you want to open with the internal editor to Eclipse's "File Associations". They are found (in my MacOS version) in Preferences>General>Editors>File Associations, list the types you want opened internally, and chose "Text Editor (defalut)" as "Associated editors". I hope this helps.

share|improve this answer
    
Worked for me in Aptana. –  DanH Apr 14 at 3:23

If you right-click the file in the Package Explorer/Navigator, you will see an Open-With menu item where you can select how the file should be opened. So, if you need to edit an .sh file just right-click and select Open With > Text Editor. There is also the Other... submenu item where you could pick other modes for Eclipse to open the file.

share|improve this answer

The problem with this is that when Eclipse doesn't know what to do with a given file, it opens it with the so called "System Editor", which actually is... whatever your OS says it is, hence the "rolling dice effect". I don't think you can tell the OS to use Eclipse as the default editor (though I didn't try; anyway I wonder why anyone would actually want to do it), so you have two alternatives: either install an eclipse plug-in to manage the kind of file you want to edit (like e.g. pyDev for python), or go to Window > Preferences > Editors > File Associations and associate your file extensions to the built-in text editor in Eclipse.

I happen to be a heavy user of Vim, Emacs and Eclipse, and for this job Emacs is definitely not what you really want, though if you want to try it for its own merits, Emacs can substitute Vim quite well (modal interface and all), look for viper and vimpulse.

FYI: I came here after reading your post

share|improve this answer
1  
Thanks for your response. The system associations make sense when opening files from a file explorer / the desktop / etc. All I want is an option to default to the internal text editor rather than an external application even if I haven't installed a specific plugin (granted they may be useful, but the default behaviour should be sane). –  Draemon Aug 6 '11 at 13:35
    
FWIW, having a specific plugin does not entirely resolve the problem. For example, I switched from Eclipse PDT's editor to an external editor (Sublime Text 2). I'm tired of that editor now and want to switch back, but it does not seem to be trivial to get the original syntax-highlighted editor back. –  dpk Nov 7 '11 at 17:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.