Set Text Color
-
Hi all,
I have a simple and primitve text format like this:
<Country:
Name:Germany
Population:82,000,000
<BorderCountries:
Country:Austria
Country:Poland
Country:DenmarkThe format is very simple ‘<’ is the opening Tag, ‘>’ is the closing Tag, ‘:’ is the separator Tag between a node name and its value e.g. name:value
In my .NET plugin, I want to set the color of the node names (like Name, Population, BorderCountries…etc.) and the values like ‘Germany’, ‘Austria’, ‘Poland’…etc.
I do the text parsing and formatting in my plugin.
How can I tell Notepad++ to set the color of specific text?
I tried the UDL but couldn’t come up with a solution.
Best regards,
Faris Ahmed -
I do the text parsing and formatting in my plugin.
So you mean are actually writing a custom lexer? If so then you might want to look at some other lexers people have created and see how they are doing it. In general a lexer assigns a style number to each character and then that style number has color/font/underline/bold/etc associated with it.
I tried the UDL but couldn’t come up with a solution.
I’ve never use UDL so I can’t be of any help here. :)