Sublime Forum

DetectSyntax updated with new_file_syntax

#1

If you haven’t followed this thread [1] about setting a default syntax when a new file is created, you might be interested to know that I just updated DetectSyntax to provide this functionality. All you need to do is add

"new_file_syntax": "name of syntax"

to Packages/User/DetectSyntax.sublime-settings and all new files will start with that syntax assigned. Keep in mind that once you save the file, any other rules in DetectSyntax will kick in and the syntax could change. The new_file_syntax applies only in the on_new event listener.

[1] How to set default syntax on new window/tab?

0 Likes