Intellij: What to do with .cfm files that are actually .xml files

by kai on 10/03/2013



If you work with CFML, you might have come across a situation in which you’re working with .cfm files that actually contain XML-only content. There are many reasons why developers would put XML-only content into .cfm files, but typical examples would be certain framework files such as circuits in Fusebox or maybe configuration files in ColdSpring, Fusebox or other frameworks.

If you’re using IntelliJ as your development environment, the default behaviour would be that the IDE opens your myfile.xml.cfm in the CFML editor. I find that’s usually not what you’d want – as you probably would rather want proper XML editing and code completion features.

Luckily, that’s easy to deal with. Open the Preferences panel in IntelliJ, go to File Types, select XML files and add another registered pattern for the file pattern *.xml.cfm. The screenshot (IntelliJ 12, yours might look differently on other versions) shows how that’s supposed to look like.

IntelliJXMLCFM

Comments on this entry are closed.

Previous post:

Next post: