Just hit Tools -> New Plugin
Then paste this over the file, hit save and call it "DefaultLanguage.py" or something
import sublime, sublime_plugin
class EverythingIsPowerShell(sublime_plugin.EventListener):
def on_new(self, view):
view.set_syntax_file(‘Packages/PowerShell/Support/PowershellSyntax.tmLanguage‘)
Of course, you can change the language from PowerShell to ... whatever you prefer. You just need the relative path to the tmLanguage. You can get that by opening a file in your favorite language and then open the console (View->Show Console) and type:
view.settings().get(‘syntax‘)
原文:http://www.cnblogs.com/non-clockwork-cheng/p/6387803.html