Author Topic: User keywords highlighting  (Read 3591 times)

Offline PMike

  • Multiple posting newcomer
  • *
  • Posts: 13
User keywords highlighting
« 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.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: User keywords highlighting
« Reply #1 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.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline PMike

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: User keywords highlighting
« Reply #2 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.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: User keywords highlighting
« Reply #3 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".
Be patient!
This bug will be fixed soon...

Offline PMike

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: User keywords highlighting
« Reply #4 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.