Sublime Forum

Percent symbol highlighted in C

#1

Hi,

how can I disable percent(%) symbol highlighting in C syntax highliting? And by the way, what is it for?

0 Likes

#2

The percent (%) operator in C and C++ is the modulus operator. It returns the first number mod the second number. Source
But why itā€™s highlights in strings, Idk, probably itā€™s a bug.

0 Likes

#3

Itā€™s highlighting the % because itā€™s assuming that youā€™re making a printf format string, and that youā€™ve made it wrong. Unfortunately thereā€™s no way to tell it itā€™s not a printf format string short of changing the syntax file.

0 Likes

#4

@ArtDesire, I was asking what is the percent symbol highlighting for, not what does percent symbol do :smile:.

Anyway, thanks. Iā€™ve commented the value ā€œinvalid.illegal.placeholder.cā€ in C.tmLanguage on line 1116 and itā€™s gone :unamused:.

0 Likes