How do I specify an extension to be XML?


#1

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?


#2

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:


#3

Awesome, thanks mate. :smile:


#4

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


#5

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?


#6

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.


#7

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 init.coffee script:

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


#8

That looks very useful. Thanks.