I saved file default_syntax.py into
Library ▸ Application Support ▸ Sublime Text 3 ▸ Packages ▸ User
with this code in it
import sublime
import sublime_plugin
class DefaultSyntaxCommand(sublime_plugin.EventListener):
def on_new(self, view):
view.set_syntax_file(‘Packages//.tmLanguage’)
But it didn’t work.Console Panel in ST3 gives me this
Traceback (most recent call last):
File “/Users/username/Library/Application Support/Sublime Text 3/Packages/User/default_syntax.py”, line 1, in
import sublime
ModuleNotFoundError: No module named ‘sublime’
[Finished in 0.0s with exit code 1]
[shell_cmd: python3 -OO -u “/Users/username/Library/Application Support/Sublime Text 3/Packages/User/default_syntax.py”]
[dir: /Users/username/Library/Application Support/Sublime Text 3/Packages/User]
[path: /Library/Frameworks/Python.framework/Versions/3.8/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin]
Here is also a screenshot of my Sublime Text 3 Folder
How can i finally sep up python 3 as my def syntax?I don’t like using cmd+shift+p and then type python to change my syntax from plaint text to python3
UPD:I was trying this in both ST3 python3 file type and in os x terminal console with python interpreter turned on