I'm trying to create a keyboard shortcut to set an unsaved file's syntax.
view.syntax_name(view.buffer_id()) in the console returns the correct type for files already saved, but I can't figure out how to set it.
Thanks,
Kirk
view.settings().set('syntax', 'Packages/'+ syntax + '/' + syntax + '.tmLanguage')jps wrote:view.settings().set() should work, but isn't the best way to change the syntax in any case, as it won't cause the right .sublime-settings files to be associated with the view.
Users browsing this forum: Google [Bot] and 14 guests