Atom Custom File Type Detection


On 03-12-2019 code, OpenCart, web design

In this example I will show you how you can set OpenCart’s .tpl file extension to read as PHP when opening in Atom Editor.

Open your config.cson file. Underneath core: add:

customFileTypes:
        'text.html.php': [
            'tpl'
    ]

text.html.php is the “source” and the tpl is the file extension. Now when you open a .tpl file it will read as a PHP file by default.

If you want any other custom file types you can follow this format, full directions found on flight manual.

Speak your mind

You must be logged in to post a comment.