Question

I don't know if cc-mode or cedet is providing something alike that but that must not be such hard to realize I hope.

What I want is to change background for code in C++ / C# source files between #ifdef (something) and #endif. Is there mode option for make it or where from to start?

Was it helpful?

Solution

You can use the 'hideif' package which you can enable with:

M-x hide-ifdef-mode

After you enable it, you need to customize hide-ifdef-shadow to be true to indicate coloring instead of invisible text.

If you use CEDET to parse your files, you will gain the added benefit of many of your #define macros being accurate with hideif too.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top