Skip to content

Instantly share code, notes, and snippets.

@leotm
Last active July 9, 2020 18:54
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save leotm/320a949b092bf30913ef to your computer and use it in GitHub Desktop.
Save leotm/320a949b092bf30913ef to your computer and use it in GitHub Desktop.
Sublime Text 3 - Set default syntax
# AppData\Roaming\Sublime Text 3\Packages\User\default_syntax.py
import sublime, sublime_plugin
class DefaultSyntaxCommand(sublime_plugin.EventListener):
def on_new(self, view):
# Replace <Language> with desired default language
# Check in AppData\Local\Sublime Text 3\Cache
view.set_syntax_file('Packages/<Language>/<Language>.tmLanguage')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment