Just as a follow up question to this. How do you set a user defined term to show the defined color in live code but not in comments? I thought it had something to do with the priority setting, but a given setting value seems to be shared by an entire list.
You can have multiple list. All words that should be code only, but not comments => go into one list (or several for diff colors).
And that list then gets the priority.
However, you can not do
- some words only source
- other words only comments
Because for only source, the comment must have higher prior than source.
And for only comments it would be reverse.
First:
(Assuming you want to change foreground color / otherwise substitute foreground for what ever you need)
- Go to Display > Colors
- In the color tree find the entries for comment and string (as if you wanted to change their color)
- For each of them
- At the bottom directly above the color-boxes, find the button "priority"
- change the priority for foreground to: 2
- Then go to User Defined Markup
- Select your list
- For the foreground color select priority: 1
In Lazarus 5.0 you will be able to add words for sources to the HL directly (up to 10 lists). However only full words, no part words, nor multi word.
(Yes I mean 5.0 / not 4.0)