Last active
February 28, 2016 15:22
-
-
Save scottlaplant/6d410cf5dcf6edb0dfa9 to your computer and use it in GitHub Desktop.
Create default document type in Sublime Text
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Make default document Sublime Text 3 creates is HTML | |
Go to Tools -> New Plugin | |
Then paste this over the file, hit save and call it "DefaultHTML.py" or whatever you like | |
import sublime, sublime_plugin | |
class EverythingIsHTML(sublime_plugin.EventListener): | |
def on_new(self, view): | |
view.set_syntax_file('Packages/Text/Plain text.tmLanguage') | |
Of course, you can change the language from HTML to ... whatever you prefer. You just need the relative path to the tmLanguage. You can get that by opening a file in your favorite language and then open the console (View->Show Console) and type: | |
view.settings().get('syntax') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment