Author Topic: Editor: syntax highlighting - defining custom comments or non-highlighed lines  (Read 4284 times)

Offline pmichal

  • Single posting newcomer
  • *
  • Posts: 2
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));

Greetings

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
You would have to write your own lexer...

This is currently not supported

Offline pmichal

  • Single posting newcomer
  • *
  • Posts: 2
Ok, thank you for your answer.