News:

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

Main Menu

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

Started by pmichal, April 20, 2022, 11:10:29 PM

Previous topic - Next topic

pmichal

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.

MY_KEYWORD (2,"string here " + function(variable));

Greetings

BlueHazzard

You would have to write your own lexer...

This is currently not supported