Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: fthieme on February 21, 2007, 09:39:35 pm
-
is there a way to let blocks surrounded by #if 0 ... #endif "disappear" like comments do?
-
Haven't tried it, yet, but you may use "Edit"->"Comment" and "Edit"->"Uncomment" to disable your code.
-
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, ...
-
Settings -> Editor -> Folding,
Enable "Fold preprocessor commands".
-> Fold the preprocessor command "#if 0"... ;-)
With regards, Morten.