Sublime Forum

Syntax Highlighting gone from version update

#1

So a pop up offered to upgrade to the latest version so I said ok.
After doing so, my syntax highlighting dissappeard.

The build version is 4180.

It’s been a long time since I set it up, but I was using the editor for a program that has similar syntax like C.

I thinking I originally just modified a C syntax file somewhere I forget to get the highlighting the way I wanted.

Does anyone know where that file might be(recover and apply), or even better a link to an easy how to tutorial - I don’t mind redoing it as I might want to refine it further - It’s just been a long time since I’ve done changes to Sublime, I just don’t know my way around it anymore.(that’s why if there is a known easy to follow tut, that would be useful instead of me making my way through alot of search results).

I just know when I try selecting C or C++ under View > Syntax, I just don’t get the same highlighting I used too have.

Thanks.

0 Likes

#2

If you are using a “normal” setup - not extracting bundled packages and directly manipulating them in-place - then all your customizations should be located in ~/.config/sublime-text/Packages and so should any customized C syntax. They override any file from packages located in ~/.config/sublime-text/Installed Packages or the bundled packages shipped with ST. In that case nothing should have been lost, as the whole user profile directory keeps untouched by upgrading ST.

If you directly manipulated the syntax you might find a zipped backup of your former setup in trash bin to extract your customized syntax from.

0 Likes

#3

Thank, but I think I just messed things up more.
I don’t remember what I originally did so I first went looking for ~/.config/sublime-text/Packages but took a detour in App roaming data and saw a VEX package under installed packages directory.
So I re-installed it thinking the new version uninstalled it.
But then when I went to select syntax, not only was VEX greyed out, but so was my C and C++ options.
So I looked in the trash bin and saw a sublime folder there. So I restored it.
Now C and C++ are back but now I have a Vex package and two VEX packages.

And none of them have my ‘original’ syntax highlights.

So I’m just going to leave it for now…and when I have time, find some tutorials to figure out how this Sublime text works with packages and so on.

Thanks for the effort to help

0 Likes

#4

VEX seems unrelated with C/C++ packages.

The only change of C/C++ between ST4169 and ST4180 is related with a detail about how block comments are scoped (see: https://github.com/sublimehq/Packages/pull/3217).

Packages from zipped backup shouldn’t be restored into user profile as the archive only contains files from application install directory.

Greyed out menu items sometimes indicate disabled packages (see: ignored_packages setting).

0 Likes

#5

I’ve narrowed down the cause of this and am working on a fix.

0 Likes

#6

Any example of what’s going wrong? Is it related with the “pop from with_prototype” issue, which caused syntax breaking in Mustache?

0 Likes

#7

It’s an issue with deduplicating short regexes (<8 characters) that have the same middle character, for instance }}. and }}}. will be incorrectly deduplicated. This can be worked around by adding a comment or otherwise making the regex longer/different. This will be fixed in the next build.

0 Likes