Content Inspection of a file to determine it's type


Hi all,

I was wondering if it is currently possible to do the following in atom:

  • Inspect the content of a file to determine its language and type, instead of looking at extension.
  • Create a new file with a standard template.

For example, if I am creating an html file, it should automatically include html and /html

Currently, this is possible with snippets, which completes the template when we enter a prefix string. I want to know if this is possible right at file creation.

Thanks a lot!


Atom already has this feature. See the first-mate package. This is how it detects the file type of shell scripts, which commonly are stored without extensions but are detected from the shebang line.