Sublime Forum

Default File Type

#1

In response to this feature request, I’ve thrown together a small plugin which will set the syntax highlighting of new files automatically.

Project page is here: github.com/spadgos/sublime-DefaultFileType
Installation through Package Control, or by cloning the repo into your Packages dir.

In short, the package overrides the Ctrl/Cmd+N hotkey to create a new file and set its syntax highlighting to the type of the current file. More details are in the readme.

One very nice side-effect which ST2 adds all by itself (no magic on my part) is that when you save the new file, the extension is already prefilled for you.

As usual, I’m always happy to hear feedback, feature requests and bug reports which you can add on the github tracker.

0 Likes