I'm using Galileo and plenty of file types work just fine (java, txt) but others open in an external editor. Double clicking on a .sh opens it in emacs. Double clicking on a .py opens bluefish. What sort of madness is this and how do I stop it? I don't want to make an association for each type explicitly; I just want everything to open in the internal editor by default (or preferably Eclim, but that's another issue).

Any ideas?

link|improve this question
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
@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 at 21:19
feedback

closed as not a real question by studiohack Dec 7 '11 at 17:19

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. See the FAQ for guidance on how to improve it.

2 Answers

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

link|improve this answer
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
feedback

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.

link|improve this answer
feedback

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