How to mimic Python commenting for personal file type


I have my own file type “.inst”, that currently edits in plain text for Atom.

Comments in my files are done exactly like Python’s, with a # signifying the beginning of a line comment.

How do I get the ctrl-/ command to comment out lines in my files, the same way it does for Python files?


You can do it by creating your own language package and telling it what the comments should look like in the language-specific settings. Once Atom has that information, the ctrl-/ command will be unlocked. You can look at some of the small language packages I have on GitHub and the official packages for reference, and if you have any questions I can answer them.


For now, I think I’m just going to literally treat it as a python file: