How do I specify an extension to be XML?


I am trying to specify that files with XAML file extension is of type XML.

I can’t see a way of doing this, can this be configured from the .atom directory, or does it need to be included in a package?


There is currently no way of doing this from your Atom configuration. There is an Issue open for this on the Atom Core repository though:

But since it was a simple change, I went ahead and created a Pull Request on the language-xml package:


Awesome, thanks mate. :smile:


I added an extension to the coffee file type once. I don’t remember exactly how. I think maybe I edited a package?


You most likely edited the language-coffee-script package. Though I don’t see a commit in the official repository nor do I see that you’ve forked the package. I guess you edited it by hand?


Yes, I hacked it when I needed it. It was .cof instead of .coffee. I used .cof in personal projects until recently. I’m a really lazy typist (one reason I love CS).

I obviously wouldn’t want to add that to a public release.


There are always going to be personal preferences along these lines.

While it is nice to be able to do PR’s etc, I think it would be very handy to be able to configure extras (like .cof and I have a few for powershell/batch scripts etc) which you personally would use, but not worth including and merging publicly.

I found this useful package, which allows me to include a ‘file-types’ mapping to my script:

I tried to do a box link for this post, but it didn’t work :wink:


That looks very useful. Thanks.