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 ?
Try adding the PHP file type to Content types. Go into Eclipse Preferences
General > Content TypesChoose
JavaScript Source Filein Content Types and,In the
File associationsclickAddand add*.phplike so :Then in the Open With menu for php files, the JS Editor should start appearing like so :