Hi, I can’t figure out what is wrong, please help me (OS: Windows, Sublime Text 3 Build 3059)
I wrote simple plugin:
class OpenHostsFileCommand(sublime_plugin.TextCommand):
def run(self, edit):
view = self.view.window().open_file('c:/windows/system32/drivers/etc/hosts')
view.set_syntax_file('Packages/INI/INI.tmLanguage')
Menu item:
...
{
"caption": "Open System Hosts File",
"command": "open_hosts_file"
}
...
In this case file is opening but function set_syntax_file does not do anything.
Opened file still has default syntax (Plain Text).