So the following method would work:
Without touching the configuration:
- Change the file type mapping through the
Preferences > Editor > File Types
setting - Restart PhpStorm
- As soon as the "File type recognized" message appears, click the "Revert" links (see question)
- Redo step 1
Now 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.