sublime-DefaultFileType
sublime-DefaultFileType copied to clipboard
Use on_new
Instead of rebinding ctrl+N, using the on_new event should work a bit better.
Will this fix the issue where the plugin doesn't take effect if you just start typing in an empty Sublime window? Hope so! :)
@Viper007Bond, you can use this one instead and activate it by adding "on_new": "new_file_syntax" on user settings.
This all seems like overkill. Surely all you need is a simple macro?
import sublime, sublime_plugin
class EverythingIsLanguage(sublime_plugin.EventListener):
def on_new(self, view):
view.set_syntax_file('PutYourLanguageHere')