Sublime Forum

Discriminate the comments syntax // and /**/ in c++

#1

I am newbie with “sublime text” and I work with language c/c++ (Monokai theme).
Now I would like to ask if it is possible to discriminate the comment syntax “//” by “/* /" that they are, by default, highlighted in the same way. in short, it is possible the comments “//” highlighted in green and comments "/ */” highlighted in red?

Many thanks,
Giampa.

0 Likes

#2

You can view the scope in both comment types, and then change your color scheme to color them differently.

0 Likes

#3

Could you explain in more detail?

0 Likes

#4

See e.g. a similar question at: viewtopic.php?f=3&t=17857&p=67131&hilit=highlight+scope

0 Likes

#5

Basically you need to figure out what the scope is, then find that scope in your color scheme file, and change it. I also recommend github.com/skuroda/PackageResourceViewer to help you edit your color scheme.

0 Likes

#6

Finally I found exactly what I was looking for in this topic:
https://forum.sublimetext.com/t/change-the-bg-of-comments/14139/1
:smiley:

0 Likes