User forums > General (but related to Code::Blocks)

Editor: syntax highlighting - defining custom comments or non-highlighed lines


Hello everyone - this is my first post.

I have a question that I couldn't find an answer to in the forum:

In the Code::Blocks editor, is it possible to define an entire line highlight if it starts with a user-defined keyword?
The end result would look like a comment but with custom word(s) defining the start of the 'comment'.
For example, I would like the line below to be colored as a comment, instead of recognizing (and coloring separately) numbers, strings, variable names, etc. Of course, the compiler will still recognize c / c ++ keywords and compile correctly.
I just wish some of my code was not highlighed.

--- Code: ---MY_KEYWORD (2,"string here " + function(variable));
--- End code ---


You would have to write your own lexer...

This is currently not supported

Ok, thank you for your answer.


[0] Message Index

Go to full version