<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Syntax highlight % and %% lines differently]]></title><description><![CDATA[<p dir="auto">Hi<br />
I am creating a UDL using the GUI.  I need to distinguish between lines starting with a single %,  which marks a comment line, and those that start with %% which are quite different.<br />
How do I do that please?<br />
Thanks</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/25483/syntax-highlight-and-lines-differently</link><generator>RSS for Node</generator><lastBuildDate>Mon, 11 May 2026 21:37:10 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/25483.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 17 Feb 2024 15:50:50 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Syntax highlight % and %% lines differently on Mon, 19 Feb 2024 20:03:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jnbearon" aria-label="Profile: jnbearon">@<bdi>jnbearon</bdi></a> said in <a href="/post/93013">Syntax highlight % and %% lines differently</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ekopalypse" aria-label="Profile: Ekopalypse">@<bdi>Ekopalypse</bdi></a><br />
I have a problem in that I am already short of Delimiter defs as the language definition form only allows 8 to be set.  That then prompts 2 further questions:</p>
<ol>
<li>Can I define more than 8 delimiters - by editing the XML file?</li>
</ol>
</blockquote>
<p dir="auto">No.  The number of colors is compiled into the program, and cannot be changed by a config file.</p>
<blockquote>
<ol start="2">
<li>Can I assign more than 1 delimiter to a particular colour? (I would be quite happy to bundle a few of the less often used ones into a single colour, but have the more popular ones having their own specified coloured line.</li>
</ol>
</blockquote>
<p dir="auto">Yes. You can see an example of this in the “Markdown (preinstalled)” UDL that ships with Notepad++:</p>
<p dir="auto"><img src="/assets/uploads/files/1708372904637-080344fd-fb48-40e5-9ed4-c2a91c9deb6e-image.png" alt="080344fd-fb48-40e5-9ed4-c2a91c9deb6e-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Just put the space-separated list of open and the space-separated list of close in the same order</p>
]]></description><link>https://community.notepad-plus-plus.org/post/93015</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/93015</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Mon, 19 Feb 2024 20:03:53 GMT</pubDate></item><item><title><![CDATA[Reply to Syntax highlight % and %% lines differently on Mon, 19 Feb 2024 19:39:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ekopalypse" aria-label="Profile: Ekopalypse">@<bdi>Ekopalypse</bdi></a><br />
Thanks Ekopalypse, that method does work if <strong>both</strong> are defined in “Operators and Delimiters”. What does not seem to work is to have % set as the comment marker in “Comment and Number” and %% set in the “Operators and Delimiters”.  If there are consecutive lines starting with %% then they get coloured in alternating colours - seems to be something to do with how the ((EOF)) is interpreted.</p>
<p dir="auto">I have a problem in that I am already short of Delimiter defs as the language definition form only allows 8 to be set.  That then prompts 2 further questions:</p>
<ol>
<li>Can I define more than 8 delimiters - by editing the XML file?</li>
<li>Can I assign more than 1 delimiter to a particular colour? (I would be quite happy to bundle a few of the less often used ones into a single colour, but have the more popular ones having their own specified coloured line.</li>
</ol>
<p dir="auto">Thanks</p>
]]></description><link>https://community.notepad-plus-plus.org/post/93013</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/93013</guid><dc:creator><![CDATA[jnbearon]]></dc:creator><pubDate>Mon, 19 Feb 2024 19:39:04 GMT</pubDate></item><item><title><![CDATA[Reply to Syntax highlight % and %% lines differently on Sat, 17 Feb 2024 18:57:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jnbearon" aria-label="Profile: jnbearon">@<bdi>jnbearon</bdi></a></p>
<p dir="auto">In this case, you could use UDL’s own functionality by ensuring that you define two delimiters, with the <code>%%</code> defined first and both ending with the <code>((EOL))</code> marker.</p>
<p dir="auto"><img src="/assets/uploads/files/1708196221190-4c76f120-adb0-4093-a6d2-664eddafeede-image.png" alt="4c76f120-adb0-4093-a6d2-664eddafeede-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.notepad-plus-plus.org/post/92965</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/92965</guid><dc:creator><![CDATA[Ekopalypse]]></dc:creator><pubDate>Sat, 17 Feb 2024 18:57:14 GMT</pubDate></item><item><title><![CDATA[Reply to Syntax highlight % and %% lines differently on Sat, 17 Feb 2024 16:22:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jnbearon" aria-label="Profile: jnbearon">@<bdi>jnbearon</bdi></a><br />
Off the top of my head, the best way to do this is probably to use <a href="https://github.com/Ekopalypse/EnhanceAnyLexer" rel="nofollow ugc">EnhanceAnyLexer</a>.</p>
<p dir="auto"><code>^%(?!%).*$</code> matches any line that begins with a single <code>%</code><br />
<code>^%%.*$</code> matches any line that begins with <code>%%</code></p>
]]></description><link>https://community.notepad-plus-plus.org/post/92964</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/92964</guid><dc:creator><![CDATA[Mark Olson]]></dc:creator><pubDate>Sat, 17 Feb 2024 16:22:30 GMT</pubDate></item></channel></rss>