Richard Bucker

atom.io filetypes

Posted at — Mar 18, 2015

I’ve been playing with a go package called safekeeper. The way it works is that it takes a xxxxxxx.go.safekeeper file as input and does a search/replace on various environment variables that you specify and outputs a .go file which is then compiled into your project.

One of the things I don’t like about the project is that since one of the input files is, in fact, a .go file with a different filename extension (.go.safekeeper) the atom.io editor does not know what syntax highlighting to apply.

Thankfully there is a package called file-mode which you’ll install in the usual atom way so I’m not going to detail that here. But I had a number of challenges getting things to work once the package was installed… and I do not have a specific recipe that made things work but in the end it did.

The first few times I tried it failed. It might work for you. The documentation is sketchy but it recommended reloading the file after adding the sentinel. I tried that.  I also tried restarting the editor. And the very last thing I tried was ctl+alt+l.  (that’s the lowercase L) And it worked.

Atom.io is a fast moving editor. There is a release every two days or so. At least 2 of the packages I depends on are updated even more frequently. I’m not a fan of javascript editors like brackets and atom for silly reasons but since I’m trying to build my own web based IDE I might like to integrate with Atom. Brackets, on the other hand, appears to be a RAD tool.