News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Syntax highlighting of disabled blocks

Started by fthieme, February 21, 2007, 09:39:35 PM

Previous topic - Next topic

fthieme

is there a way to let blocks surrounded by #if 0 ... #endif "disappear" like comments do?

raph

Haven't tried it, yet, but you may use "Edit"->"Comment" and "Edit"->"Uncomment" to disable your code.

fthieme

Yeah, sure you can use comment/uncomment. But that's not what I want. I just want to have these blocks in the same color as comments - or at least in some configurable color.

Because of two reasons

1. It is no comment, but a disabled block -> you should use #if 0 ... #endif
2. There is a lot of code with this and you should see that it is no active code, as it is done with vim, KDevelop, ...


MortenMacFly

Settings -> Editor -> Folding,
Enable "Fold preprocessor commands".
-> Fold the preprocessor command "#if 0"... ;-)
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]