<?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[How do you color certain text after a keyword in notepad++?]]></title><description><![CDATA[<p dir="auto">Basically i wanted my user defined language to have certain highlighting after a certain keyword.<br />
For example, in Python, when i define a function:<br />
<img src="/assets/uploads/files/1660025345531-florida.png" alt="florida.PNG" class=" img-fluid img-markdown" /><br />
You can clearly see the text after the ‘def’ keyword in python is colored orange. When i do that in a user defined language, such as creating a function:<br />
<img src="/assets/uploads/files/1660025473043-minnesota.png" alt="minnesota.PNG" class=" img-fluid img-markdown" /><br />
You can clearly see that the text after ‘function’ is not highlighted. (Keep in mind i have my global foreground set to yellow). I want the text after ‘function’ to be highlighted a bluish-like color. How may i do this?</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/23361/how-do-you-color-certain-text-after-a-keyword-in-notepad</link><generator>RSS for Node</generator><lastBuildDate>Tue, 18 Aug 2026 05:16:23 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/23361.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 09 Aug 2022 06:12:17 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How do you color certain text after a keyword in notepad++? on Thu, 11 Aug 2022 17:36:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/neil-schipper" aria-label="Profile: Neil-Schipper">@<bdi>Neil-Schipper</bdi></a> said in <a href="/post/79115">How do you color certain text after a keyword in notepad++?</a>:</p>
<blockquote>
<p dir="auto">you described here</p>
</blockquote>
<p dir="auto">Oh, come on, that was more than a day ago.  I can’t seriously be expected to remember something from that far back! ;-)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/79116</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/79116</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Thu, 11 Aug 2022 17:36:51 GMT</pubDate></item><item><title><![CDATA[Reply to How do you color certain text after a keyword in notepad++? on Thu, 11 Aug 2022 17:14:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a> said in <a href="/post/79062">How do you color certain text after a keyword in notepad++?</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/leahnn-rey" aria-label="Profile: Leahnn-Rey">@<bdi>Leahnn-Rey</bdi></a> ,<br />
0x66ad1 = (function|void) \K\w+</p>
<p dir="auto">Sorry, I had forgotten that alternation is not a “fixed length lookbehind”: I remembered you couldn’t have + or * or ? modifiers in a lookbehind, but you also cannot have the alternation if the lengths of the alternates are different.  Switch to alternation with the \K, as I show in this reply, gets rid of that problem (because \K doesn’t have the fixed-width requirement)</p>
</blockquote>
<p dir="auto">This is a good context to deploy the <em>poor man’s variable length look-behind</em>:</p>
<p dir="auto"><code>((?&lt;=function )|(?&lt;=void ))\w+</code></p>
<p dir="auto">which you described <a href="https://community.notepad-plus-plus.org/post/73363">here</a>. Since it doesn’t rely on <code>\K</code>, it permits the <em>Find Next</em> function, which is helpful to regex learners and hackers.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/79115</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/79115</guid><dc:creator><![CDATA[Neil Schipper]]></dc:creator><pubDate>Thu, 11 Aug 2022 17:14:29 GMT</pubDate></item><item><title><![CDATA[Reply to How do you color certain text after a keyword in notepad++? on Thu, 11 Aug 2022 14:47:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/leahnn-rey" aria-label="Profile: Leahnn-Rey">@<bdi>Leahnn-Rey</bdi></a> said in <a href="/post/79098">How do you color certain text after a keyword in notepad++?</a>:</p>
<blockquote>
<p dir="auto">I do know regex, but i’m just a beginner yet.</p>
</blockquote>
<p dir="auto">Which is why we’ve given you a few examples, and linked you to the <a href="https://npp-user-manual.org/docs/searching/#regular-expressions" rel="nofollow ugc">regex documentation</a>.  I know you’ve said you’ve read it… but reading the documentation for regex once is <em>never</em> enough to understand the practicalities of it; I’ve been using regex for years (decades?) and still have to look up things on that page all the time.</p>
<p dir="auto">What you really need to do is start with easy expressions, give yourself a goal, and try to find the answer yourself to that goal <em>in the documentation</em>:</p>
<p dir="auto">For example, the “easy” part of your original goal was “how do I match a word”; you would have then dug into the documents, and found that <code>\w</code> is a “word character” and <code>+</code> means “make the quantity of the previous thing ‘one or more’”, and put those two together to find that “find one or more word characters in a row” is written as <code>\w+</code> .  Or, since we gave you that one as part of the freebie, you could have just looked up the meanings, and found other things nearby, like the <a href="https://npp-user-manual.org/docs/searching/#multiplying-operators" rel="nofollow ugc">concept of <code>*</code> meaning “0 or more of the previous thing”</a> compared to <code>+</code> as 1-or-more, or that <a href="https://npp-user-manual.org/docs/searching/#single-character-matches" rel="nofollow ugc"><code>.</code> means “any character”</a> similar to <code>\w</code> meaning “only word characters”.  (And yes, <code>.*</code> to match “0 or more of anything” is a pretty common idiom that you <em>need</em> to learn right away, if you’re going to call yourself even a beginner with regular expressions.)</p>
<p dir="auto">Your next goal might have been “after a prefix like <code>function</code> or <code>void</code>” … but that was a complicated one, and one I wouldn’t expect a newbie to get on their own right away.  Which is why I just gave it to you as part of the freebie.  So this goal was bypassed for now (though at some point, you’ll want to understand the <code>\K</code> and lookaheads and lookbehinds more thoroughly).</p>
<p dir="auto">You got the <a href="https://npp-user-manual.org/docs/searching/#regular-expressions:~:text=%5C%24%20%2C-,%5C(%20%2C%20%5C),-%2C%20%5C*%20%2C" rel="nofollow ugc">literal parentheses</a> yourself, which is great!  And Neil helped you put the lookahead in the right place (once again, getting lookaheads right is not an easy task, and one we’re more willing to do freebies on).</p>
<p dir="auto">Moving on to your added requirement of “optional parameters between the parentheses”, your first thought for doing yourself could have been “how do I translate that into computerese?  hmm, maybe ‘optional means “zero or more”; so zero or more of any character between literal parentheses’ …”  With that mental translation, it would have rung some bells: you already knew the parentheses; “any character” was the <code>.</code> that you should have found earlier, and “zero or more” was the <code>*</code> that was a line away from the <code>+</code>'s documentation, which you had already learned.  Putting that together, you get "parameters between the parentheses as <code>\(.*\)</code> .  You might have seen that it matched <em>too far</em>, and if you didn’t find the <code>?</code> on your own (right <a href="https://npp-user-manual.org/docs/searching/#multiplying-operators" rel="nofollow ugc">next to <code>+</code> and <code>*</code></a>), you could have asked a directed question “I got <code>\(.*\)</code> to match the parentheses with optional parameters, but how do I make it stop at the first close-parenthesis?”, which is more likely to get answered.</p>
<p dir="auto">Please note: I went into this detailed explanation of the thought processes involved, not because I am mad or think you are foolish or any such nonsense, but because I want to help you learn… these are thought processes you need to learn, if you ever want to get  good with even simple regex.  Since you hadn’t learned those processes yet, I thought I would share them.</p>
<p dir="auto">But also understand that this forum is not a write-my-regex-for-me free-for-all, and regular contributors here quickly tire of answering a long series of “my requirements have changed, please add this feature to the regex you already gave me” from a user.  The more effort you show, the more and better replies you will receive.</p>
<p dir="auto">Good luck.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/79111</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/79111</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Thu, 11 Aug 2022 14:47:51 GMT</pubDate></item><item><title><![CDATA[Reply to How do you color certain text after a keyword in notepad++? on Thu, 11 Aug 2022 14:09:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/leahnn-rey" aria-label="Profile: Leahnn-Rey">@<bdi>Leahnn-Rey</bdi></a></p>
<p dir="auto">It may take some tweaking to get it exactly right in all cases, but maybe this regular expression moves you closer?:</p>
<p dir="auto"><code>\w+(?=\(.*?\))</code></p>
<p dir="auto">I’m not sure where the limit of us writing regular expressions for you stops and you roll up your sleeves and craft your own is…</p>
<p dir="auto">I think the original question of “How do you color certain text after a keyword in notepad++?” has been answered, as far as the tools having been provided.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/79099</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/79099</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Thu, 11 Aug 2022 14:09:00 GMT</pubDate></item><item><title><![CDATA[Reply to How do you color certain text after a keyword in notepad++? on Thu, 11 Aug 2022 13:54:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: Alan-Kilborn">@<bdi>Alan-Kilborn</bdi></a> I do know about that. What i’m asking here is how i can color it even if it has parameters. I do know regex, but i’m just a beginner yet. So i don’t know advanced stuff.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/79098</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/79098</guid><dc:creator><![CDATA[Leahnn Rey]]></dc:creator><pubDate>Thu, 11 Aug 2022 13:54:42 GMT</pubDate></item><item><title><![CDATA[Reply to How do you color certain text after a keyword in notepad++? on Thu, 11 Aug 2022 13:22:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/leahnn-rey" aria-label="Profile: Leahnn-Rey">@<bdi>Leahnn-Rey</bdi></a> said in <a href="/post/79093">How do you color certain text after a keyword in notepad++?</a>:</p>
<blockquote>
<p dir="auto">The thing is, when i enter in function parameters, the coloring disappears.</p>
</blockquote>
<p dir="auto">That’s because with the expression you’ve used you’ve told it to color only things like: <code>func1()</code> or <code>my_func()</code>, not <code>func2(3,5)</code> or <code>func3("test")</code>.</p>
<p dir="auto">Time to learn about regular expressions!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/79096</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/79096</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Thu, 11 Aug 2022 13:22:07 GMT</pubDate></item><item><title><![CDATA[Reply to How do you color certain text after a keyword in notepad++? on Thu, 11 Aug 2022 13:16:22 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> said in <a href="/post/79082">How do you color certain text after a keyword in notepad++?</a>:</p>
<blockquote>
<p dir="auto">I had hoped that it would be as easy to understand as it could be.</p>
</blockquote>
<p dir="auto">Trust me: getting documentation so that everyone can understand is <em>hard</em>. ;-)</p>
<p dir="auto">And, as Alan said, sometimes it just takes seeing a few examples of people doing interesting-to-me things with a specific plugin before I see the usefulness of a given plugin.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/79094</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/79094</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Thu, 11 Aug 2022 13:16:22 GMT</pubDate></item><item><title><![CDATA[Reply to How do you color certain text after a keyword in notepad++? on Thu, 11 Aug 2022 13:15:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/neil-schipper" aria-label="Profile: Neil-Schipper">@<bdi>Neil-Schipper</bdi></a> The thing is, when i enter in function parameters, the coloring disappears.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/79093</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/79093</guid><dc:creator><![CDATA[Leahnn Rey]]></dc:creator><pubDate>Thu, 11 Aug 2022 13:15:52 GMT</pubDate></item><item><title><![CDATA[Reply to How do you color certain text after a keyword in notepad++? on Thu, 11 Aug 2022 13:13:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/neil-schipper" aria-label="Profile: Neil-Schipper">@<bdi>Neil-Schipper</bdi></a> said in <a href="/post/79081">How do you color certain text after a keyword in notepad++?</a>:</p>
<blockquote>
<p dir="auto"><code>\w+(?=\(\))</code></p>
</blockquote>
<p dir="auto">Works like a charm. Thanks!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/79092</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/79092</guid><dc:creator><![CDATA[Leahnn Rey]]></dc:creator><pubDate>Thu, 11 Aug 2022 13:13:06 GMT</pubDate></item><item><title><![CDATA[Reply to How do you color certain text after a keyword in notepad++? on Thu, 11 Aug 2022 12:07:53 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> said in <a href="/post/79082">How do you color certain text after a keyword in notepad++?</a>:</p>
<blockquote>
<p dir="auto">Then I thoroughly missed my target with the in-place documentation within the confuiguration file, because I had hoped that it would be as easy to understand as it could be.</p>
</blockquote>
<p dir="auto">Well, I don’t know about that.<br />
Maybe I meant it more like:  “Some real world examples (e.g. from this thread) have encouraged me to get more into the EnhanceAnyLexer plugin”.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/79086</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/79086</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Thu, 11 Aug 2022 12:07:53 GMT</pubDate></item><item><title><![CDATA[Reply to How do you color certain text after a keyword in notepad++? on Thu, 11 Aug 2022 08:19:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: Alan-Kilborn">@<bdi>Alan-Kilborn</bdi></a> said in <a href="/post/79056">How do you color certain text after a keyword in notepad++?</a>:</p>
<blockquote>
<blockquote>
<p dir="auto">You have no idea how much this is gonna help me.</p>
</blockquote>
<p dir="auto">I think the discussion in this thread has also helped others understand the EnhanceAnyLexer plugin a little better, too.  I know it has helped me.</p>
</blockquote>
<p dir="auto">Then I thoroughly missed my target with the in-place documentation within the confuiguration file, because I had hoped that it would be as easy to understand as it could be.<br />
:-(</p>
]]></description><link>https://community.notepad-plus-plus.org/post/79082</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/79082</guid><dc:creator><![CDATA[Ekopalypse]]></dc:creator><pubDate>Thu, 11 Aug 2022 08:19:16 GMT</pubDate></item><item><title><![CDATA[Reply to How do you color certain text after a keyword in notepad++? on Thu, 11 Aug 2022 08:13:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/leahnn-rey" aria-label="Profile: Leahnn-Rey">@<bdi>Leahnn-Rey</bdi></a></p>
<p dir="auto">This should work: <code>\w+(?=\(\))</code></p>
<p dir="auto">Think of the look-ahead as a kind of modifier of the active (ie, already specified, and so, to the left of the look-ahead) match specification.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/79081</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/79081</guid><dc:creator><![CDATA[Neil Schipper]]></dc:creator><pubDate>Thu, 11 Aug 2022 08:13:56 GMT</pubDate></item><item><title><![CDATA[Reply to How do you color certain text after a keyword in notepad++? on Thu, 11 Aug 2022 03:59:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a> Didn’t work. It works when i do:</p>
<pre><code>0xb0c94e = void \K\w+
0xb0c94e = function \K\w+
</code></pre>
<p dir="auto">So i will keep it that way. I’m having an issue with the positive lookahead. Since i like monokai (Which is the theme i’m using) i want my text to be colore green when there is a () at the end. But, when i do:</p>
<pre><code>0x600e6a3 = (?=\(\))\w+
</code></pre>
<p dir="auto">It doesn’t color the text before the parenthesis. Am i doing something wrong here?<br />
NOTE: i read the documentation</p>
]]></description><link>https://community.notepad-plus-plus.org/post/79080</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/79080</guid><dc:creator><![CDATA[Leahnn Rey]]></dc:creator><pubDate>Thu, 11 Aug 2022 03:59:45 GMT</pubDate></item><item><title><![CDATA[Reply to How do you color certain text after a keyword in notepad++? on Wed, 10 Aug 2022 15:25:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/leahnn-rey" aria-label="Profile: Leahnn-Rey">@<bdi>Leahnn-Rey</bdi></a> ,</p>
<pre><code>0x66ad1 = (function|void) \K\w+
</code></pre>
<p dir="auto">Sorry, I had forgotten that alternation is not a “fixed length lookbehind”: I remembered you couldn’t have + or * or ? modifiers in a lookbehind, but you also cannot have the alternation if the lengths of the alternates are different.  Switch to alternation with the <code>\K</code>, as I show in this reply, gets rid of that problem (because <code>\K</code> doesn’t have the fixed-width requirement)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/79062</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/79062</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Wed, 10 Aug 2022 15:25:27 GMT</pubDate></item><item><title><![CDATA[Reply to How do you color certain text after a keyword in notepad++? on Wed, 10 Aug 2022 15:17:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a> If i do that, it just says “Invalid lookbehind assertion encountered in the regular expression.”</p>
]]></description><link>https://community.notepad-plus-plus.org/post/79060</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/79060</guid><dc:creator><![CDATA[Leahnn Rey]]></dc:creator><pubDate>Wed, 10 Aug 2022 15:17:06 GMT</pubDate></item><item><title><![CDATA[Reply to How do you color certain text after a keyword in notepad++? on Wed, 10 Aug 2022 15:03:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/leahnn-rey" aria-label="Profile: Leahnn-Rey">@<bdi>Leahnn-Rey</bdi></a> said in <a href="/post/79055">How do you color certain text after a keyword in notepad++?</a>:</p>
<blockquote>
<p dir="auto">If i wanted to, can i add multiple ones? such as void or function?</p>
</blockquote>
<p dir="auto">Yes.</p>
<p dir="auto">There are two ways: you could either do a separate <code>color = regex</code> pair, if you want them each different colors (or even the same color but simple maintenance), or you could build a more complicated regex</p>
<pre><code>0x66ad1 = function \K\w+
0x22CD7 = void \K\w+
</code></pre>
<p dir="auto">vs</p>
<pre><code>0x66ad1 = (?&lt;=function |void )\w+
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/79059</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/79059</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Wed, 10 Aug 2022 15:03:53 GMT</pubDate></item><item><title><![CDATA[Reply to How do you color certain text after a keyword in notepad++? on Wed, 10 Aug 2022 14:01:24 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto">You have no idea how much this is gonna help me.</p>
</blockquote>
<p dir="auto">I think the discussion in this thread has also helped others understand the EnhanceAnyLexer plugin a little better, too.  I know it has helped me.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/79056</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/79056</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Wed, 10 Aug 2022 14:01:24 GMT</pubDate></item><item><title><![CDATA[Reply to How do you color certain text after a keyword in notepad++? on Wed, 10 Aug 2022 14:00:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a> If i wanted to, can i add multiple ones? such as void or function?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/79055</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/79055</guid><dc:creator><![CDATA[Leahnn Rey]]></dc:creator><pubDate>Wed, 10 Aug 2022 14:00:50 GMT</pubDate></item><item><title><![CDATA[Reply to How do you color certain text after a keyword in notepad++? on Wed, 10 Aug 2022 13:59:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a> Thank you so much Peter. You have no idea how much this is gonna help me.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/79054</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/79054</guid><dc:creator><![CDATA[Leahnn Rey]]></dc:creator><pubDate>Wed, 10 Aug 2022 13:59:25 GMT</pubDate></item><item><title><![CDATA[Reply to How do you color certain text after a keyword in notepad++? on Wed, 10 Aug 2022 13:57:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/leahnn-rey" aria-label="Profile: Leahnn-Rey">@<bdi>Leahnn-Rey</bdi></a> ,</p>
<blockquote>
<p dir="auto">I have absolutely no idea what an .ini file is.</p>
</blockquote>
<p dir="auto">The <code>.ini</code> file is the configuration file that you opened when you clicked <strong>Plugins &gt; Enhance Any Lexer &gt; Enhance current language</strong> – ie, the file that has the color codes in it.</p>
<blockquote>
<p dir="auto">i want my text to be colored blue after the keyword ‘function’.</p>
</blockquote>
<p dir="auto">Then you need to come up with a regular expression (regex) that matches the word after the keyword <code>function</code>.  In the <code>.ini</code> file, the color goes on the left of the equal sign, and the regex goes on the right.  So in the original example that <strong>Enhance current language</strong> created for you, <code>0x66ad1 = \w+</code>:</p>
<ul>
<li>the color is <code>0x66ad1</code>, which means 6 units of blue, <code>6a</code>=106 units of green, and <code>d1</code>=209 units of red;</li>
<li>the regex is <code>\w+</code> which means “one or more word characters” (where a word character is defined as letters, numbers, and underscore).</li>
</ul>
<p dir="auto">So you would need to create a regex that does what you want.  Those regex follow the same rules for Notepad++'s regular-expression search, as defined <a href="https://npp-user-manual.org/docs/searching/#regular-expressions" rel="nofollow ugc">here in the user manual</a>.</p>
<p dir="auto">To give you a freebie, you want it to require the prefix <code>function </code> , then match one or more word characters: that would look like <code>function \w+</code> .  But that changes the color of the <code>function</code> keyword as well as the function’s name, which is probably not what you want.</p>
<p dir="auto">Instead, you will want to either “<a href="https://npp-user-manual.org/docs/searching/#regular-expressions:~:text=%5CK%20%E2%87%92%20Resets%20matched%20text%20at%20this%20point." title="see details in the user manual" rel="nofollow ugc">reset</a>” the regex between with a <code>\K</code> (everything before the <code>\K</code> is “thrown out” after it matches, so using <code>function \K\w+</code> will match <code>function</code>-space, throw it out, and then match-and-color one or more word charaters) or use a <a href="https://npp-user-manual.org/docs/searching/#assertions:~:text=(%3F%3C%3Dpattern)%20%E2%87%92%20positive%20lookbehind" title="details here" rel="nofollow ugc">positive lookbehind</a> with <code>(?&lt;=...)</code> (so in your case, lookbehind for <code>function</code>-space, then normal match on one or more words would be <code>(?&lt;=function )\w+</code> ).</p>
<p dir="auto">Hope this helps.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/79053</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/79053</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Wed, 10 Aug 2022 13:57:00 GMT</pubDate></item><item><title><![CDATA[Reply to How do you color certain text after a keyword in notepad++? on Wed, 10 Aug 2022 13:39:05 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> Works like a charm, now, how do i make it so that for example, i want my text to be colored blue after the keyword ‘function’. I have absolutely no idea what an .ini file is.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/79052</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/79052</guid><dc:creator><![CDATA[Leahnn Rey]]></dc:creator><pubDate>Wed, 10 Aug 2022 13:39:05 GMT</pubDate></item><item><title><![CDATA[Reply to How do you color certain text after a keyword in notepad++? on Wed, 10 Aug 2022 10:47:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/leahnn-rey" aria-label="Profile: Leahnn-Rey">@<bdi>Leahnn-Rey</bdi></a></p>
<p dir="auto">Yes, this is a hexadecimal value that specifies the color used to highlight the matches.<br />
To quote the documentation from the configuration file:</p>
<pre><code class="language-ini">; Each configured lexer must have a section with its name,
; (NOTE: use the menu function "Enhance current language" as it takes care of the correct naming)
; followed by one or more lines with the syntax
; color = regular expression.
; A color is a number in the range 0 - 16777215.
; The notation is either pure digits or a hex notation starting with 0x or #, 
; such as 0xff00ff or #ff00ff.
; Please note: 
; * red goes in the lowest byte (0x0000FF)
; * green goes in the center byte (0x00FF00)
; * blue goes in the biggest byte (0xFF0000) 
; * this BGR order might conflict with your expectation of RGB order.
; * see Microsoft COLORREF documentation https://docs.microsoft.com/en-us/windows/win32/gdi/colorref
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/79048</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/79048</guid><dc:creator><![CDATA[Ekopalypse]]></dc:creator><pubDate>Wed, 10 Aug 2022 10:47:08 GMT</pubDate></item><item><title><![CDATA[Reply to How do you color certain text after a keyword in notepad++? on Wed, 10 Aug 2022 07:34:43 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> Also, what are the codes you are entering? Looks like hexadecimals.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/79047</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/79047</guid><dc:creator><![CDATA[Leahnn Rey]]></dc:creator><pubDate>Wed, 10 Aug 2022 07:34:43 GMT</pubDate></item><item><title><![CDATA[Reply to How do you color certain text after a keyword in notepad++? on Wed, 10 Aug 2022 07:32:45 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> Thanks, I’ll try later.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/79046</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/79046</guid><dc:creator><![CDATA[Leahnn Rey]]></dc:creator><pubDate>Wed, 10 Aug 2022 07:32:45 GMT</pubDate></item></channel></rss>