Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wrong default syntax highlighting in sublime text 3

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?

like image 308
Kludge Avatar asked Sep 16 '15 12:09

Kludge


People also ask

How do I change the default language in Sublime Text?

{ "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.

How do I change the default syntax in Sublime Text 3?

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.

Does Sublime Text support syntax highlighting?

Sublime Text can use both . sublime-syntax and . tmLanguage files for syntax highlighting.

How do I install syntax highlighting in Sublime Text 3?

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!


1 Answers

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.

like image 114
MattDMo Avatar answered Oct 27 '22 13:10

MattDMo