I am trying to figure out how to add a custom file type to be recognised by Netbeans.
I am editing .tpl files and I would like them to be recognised as PHP/HTML file
Go to
Netbeans
tools
options
Miscellaneous
Files
Now find the row file extension
select tpl
. Then most important to Choose the Associated File Type (MIME)
as text/x-php5
. After save this, restart netbeans.
In NetBeans 8.XX this is achieved by going to NetBeans > Preferences > Miscellaneous > Files. In the row File Extension click on NEW and enter your new file extension without the dot (example: tpl). Choose the Associated File Type (MIME) and click Apply.
If you're looking for how to get Netbeans to recognize smarty templates, there's now a Smarty template plugin that should be more useful: http://plugins.netbeans.org/plugin/37379/php-smarty
Let me guess, for Smarty templates? I did the following