Sublime Forum

Shebang over extension

#1

I have .html files with shebang and my .tmLanguage file has the configs above, but sublime sets HTML syntax.

<key>fileTypes</key> <array> <string>htm</string> <string>vm</string> <string>inc</string> <string>tpl</string> </array> <key>firstLineMatch</key> <string>^#!vm;[a-z0-9-]*</string>

How can I set the sublime to prefer the shebang over file extension to set the correct syntax?

0 Likes

#2

I believe package github.com/facelessuser/ApplySyntax/ does this

0 Likes