I am currently evaluating PhpStorm as an alternative to Aptana Studio, we use right now. But one issue really annoys.
We use the *.tpl file extension for our PHP templates. This file type is usually mapped to Smarty. It was quite easy to set this to "PHP files (PHP)". But each time I restart PhpStorm, I get this message:
File type recognized: File extension *.tpl was reassigned to Smarty
So it maps the file type back to Smarty. If I try to "Revert" it through the "Event log", it will than map it to "Text files" but not back to PHP.
So, how can I prevent PhpStrom from touching my manual changes are keep the mapping to PHP (and not to Smarty)?
So the following method would work:
Without touching the configuration:
Preferences > Editor > File Types
settingNow PhpStorm should not map it back again.
With touching the configuration files:
In your user profile, you should have a folder .WebIde70/config/options
(or something similar) and there you should have a file called filetypes.xml
(if not create an empty one), where you can set the mapping and prevent PhpStorm from reverting it. Here is a simple example with only the mapping for my question:
<?xml version="1.0" encoding="UTF-8"?>
<application>
<component name="FileTypeManager" version="11">
<ignoreFiles list="CVS;SCCS;RCS;rcs;.DS_Store;.svn;.pyc;.pyo;*.pyc;*.pyo;.git;*.hprof;_svn;.hg;*.lib;*~;__pycache__;.bundle;*.rbc;" />
<extensionMap>
<mapping ext="tpl" type="PHP" />
<removed_mapping ext="tpl" approved="true" type="Smarty" />
</extensionMap>
</component>
</application>
As you can see, the settings file not only sets the new mapping, but also removes the original mapping for the Smarty template.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With