Sublime Forum

Auto-syntax detection

#1

Hi

I have never used Sublime before but it may depend if go into it. I am particularly looking if it can be configured through plugins or other means to auto-select syntax highlighting based on the very first line of just opened file. I am working with old UNIX style files that is they don’t have extensions in the file name but the extension is defined in the file.

Thanks

0 Likes

#2

yes, there is native support in syntax definitions for specifying a regex pattern to match against the first line to determine which syntax to use.

0 Likes