3

Is there any way to de-highlight unused conditional blocks in Sublimetext 3.

#define SOMETHING 

#if SOMETHING
    // Show in default color
#elif NOTHING
    // De-highlight this portion. May be just gray color font.
#else
    // De-highlight this portion. May be just gray color font.
#endif
user5209405
  • 53
  • 1
  • 5

2 Answers2

0

The ability to create your own syntax highlighting rules is one of the excellent features of SublimeText.

Have a look here at some other people wanting to build their own syntax highlighting rules:

How to not highlight object keys such as 'do'/'package' as keywords in Sublime?

Sublime Text - C++ Highlight

That explains the basic tools you need to use to do what you want to do.

If you give that a try and have trouble with developing the relevant Regular Expression/s to do what you want to do then post what you have done and how it is not working the way you hoped and perhaps we can help you get to the end of the game.

Community
  • 1
  • 1
jwpfox
  • 5,124
  • 11
  • 45
  • 42
0

Here's a plugin that is NOT EXACTLY made for that.

I am not sure is that acceptable for you.

The problem is that it doesn't analyse the condition in the code at all.

You may see the screenshot in its issue#1.

Jack Cherng
  • 23
  • 1
  • 6