Code::Blocks Forums

User forums => Help => Topic started by: PMike on October 28, 2005, 09:25:05 am

Title: User keywords highlighting
Post by: PMike on October 28, 2005, 09:25:05 am
There is an option in Color settings to hightlight user keywords.
However, I cannot find way to edit user keywords list.
Modifying general keywords is OK.

I've tried to manually edit share\CodeBlocks\lexers\lexer_cpp.xml
but no luck - user keywords not highlighted.
Title: Re: User keywords highlighting
Post by: thomas on October 28, 2005, 10:41:41 am
share\CodeBlocks\lexers\lexer_cpp.xml is indeed the correct file to edit.

Look for the User tag and put them in there.
Title: Re: User keywords highlighting
Post by: PMike on October 28, 2005, 12:10:57 pm
Well, I've found <User index="1"/> tag within <Keywords> tag.
Then I add a keyword: <User index="1" value="testkeyword"/>
Now start C::B, typing "testkeyword" in *.cpp file - nothing happen.
Keyword isn't highlighted.
PS. I use latest C::B rc2 build.
Title: Re: User keywords highlighting
Post by: mandrav on October 28, 2005, 12:34:28 pm
The lexer*.xml files are read on startup but if you 've made modifications to the original theme, then the actual settings are loaded from the config not the xml file. If you wish to re-read the xml file, go to "Editor->Colors" select the language you want and press "Reset defaults".
Title: Re: User keywords highlighting
Post by: PMike on October 28, 2005, 12:58:55 pm
Thanks mandrav, it works now.
However, it quite inconvenient to modify custom keywords list.
Especially, if I use different color set.
I hope you'll add some UI in C::B for this task.