I can't remember touching any related configuration, and for no reason, Sublime chooses "LaTeX Log" highlighting syntax as default for *.html files. I opened the Syntax Specific settings file and it's empty (?)
What can I do in order to get the proper highlighting for html files automatically?
{ "keys": ["ctrl+n"], "command": "new_file", "args": { "syntax": "Packages/JavaScript/JavaScript. sublime-syntax" }, }, Place this in your User keybindings. Now whenever you open a new file with ctrl + n , it should automatically have the JavaScript syntax applied to it.
sublime-syntax" }, }, So whenever you create a new file via ctrl + n , you can press this key binding to set the markdown syntax and when saving, it would automatically default to the . md extension in the OS save dialog.
Sublime Text can use both . sublime-syntax and . tmLanguage files for syntax highlighting.
All I have to do in order to install a new syntax scheme is open Sublime's Command Palette (⌘-⇧-P). and issue the following command: Package Control: Install Package . Now I can choose whatever package I want to install — easy! And just like that!
Changing the syntax highlighting for any file type is easy in Sublime. Simply open a file with the extension you want to change, then click on View -> Syntax -> Open all with current extension as...
and choose whichever language you wish. This will add the current extension to the "extensions"
list in Packages/User/LanguageName.sublime-settings
, where LanguageName
is the syntax you chose, such as HTML
in this case.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With