Sublime Forum

Self.view.settings().get('syntax') always return Plain text

#1

Hi,

[code]import sublime, sublime_plugin

class examplCommand(sublime_plugin.TextCommand):
def run(self, view):
Synt = self.view.settings().get(‘syntax’)
sublime.status_message(Synt)[/code]
This always return Packages\Text\Plain Text.tmLanguage
even if I switch to other syntax
Anything wrong?

0 Likes

#2

Try taking the ‘self.’ off of the call to ‘view.settings()’?

0 Likes