Reputation: 1606
I normally open a file with it's default editor. Thus a .php file is opened in the default PHP editor and treated like a PHP file.
However, often the code in my PHP files contains a lot of JS or HTML. In these cases it would be nice to open such PHP files using a JS or HTML Editor. Right now, this is a pain since I have to click on Open With -> Other
and then choose the JS or HTML Editor.
Is there a way to add the JS or HTML editor as an option to the Open With
menu ?
Upvotes: 1
Views: 2722
Reputation: 18869
Try adding the PHP file type to Content types. Go into Eclipse Preferences General > Content Types
Choose JavaScript Source File
in Content Types and,
In the File associations
click Add
and add *.php
like so :
Then in the Open With menu for php files, the JS Editor should start appearing like so :
Upvotes: 3