is c++ syntax highlighting broken?
definitely set to c++ at bottom right corner.
i was unaware of safe mode. i tried that and the highlighting does work in safe mode.
Then you’ve got a package/override breaking the syntax highlighting somehow. I suggest using the "ignored_packages"
setting to find which package is the culprit.
hmm…i only had a couple packages installed. i tried adding them to the “ignored_packages” list and restarting but that didn’t appear to help.
is there any other custom settings i could have made that could be causing the c++ highlighting to not work?
the handful of other syntaxes i tried seem to work including c and objective-c++.
you can simply run view.syntax()
in ST console to reveal information about the used syntax.
>>> view.syntax()
Syntax('Packages/Python/Python.sublime-syntax', 'Python', False, 'source.python')
view.syntax()
Syntax(‘Packages/C++/C++.sublime-syntax’, ‘C++’, False, ‘source.c++’)
This sounds like a stupid question: Is there any error/warning message about syntax file in ST console?
Perhaps you have an override in your user package. Check the menu Packages > Browse Packages… in the User folder.
nothing in the User folder looks suspicious.
if i backup and delete all the files in that folder sublime reverts to its default themes and looks like safe mode but the c++ syntax highlighting is still wrong
ok. i unziped /opt/sublime_text/Packages/C++.sublime-package
and copied the C++.sublime-syntax
file contained within to ~/.config/sublime-text-3/Packages/User/
.
now in sublime text if i click on c++
on the bottom left and select the second c++
option i just created, it highlights the syntax correctly.