<?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 to change default Powershell language so &quot;$&quot; is Green]]></title><description><![CDATA[<p dir="auto">I thought it would be a more clean if the dollar sign used for variables would be green to more easily see them in script.</p>
<p dir="auto">I just tried looking at the Npp User defined list collection, and tried out that one out, but no green $ , and I also just wish I could mode the default powershell to make it more intuitive in the NPP language menu.</p>
<p dir="auto">Thank You</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/24623/how-to-change-default-powershell-language-so-is-green</link><generator>RSS for Node</generator><lastBuildDate>Wed, 17 Jun 2026 19:27:26 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/24623.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 24 Jun 2023 12:57:18 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to change default Powershell language so &quot;$&quot; is Green on Sat, 24 Jun 2023 23:55:51 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/cooly0" aria-label="Profile: cooly0">@<bdi>cooly0</bdi></a>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/mark-olson" aria-label="Profile: mark-olson">@<bdi>mark-olson</bdi></a> and <strong>All</strong>,</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mark-olson" aria-label="Profile: mark-olson">@<bdi>mark-olson</bdi></a>, from your <strong>picture</strong>, the <strong>first</strong> <strong><code>$</code></strong> sign, in the part between <strong>quotes</strong> :</p>
<pre><code class="language-diff">del "$($vsTemplatepath)\nppplugin*.zip"
</code></pre>
<p dir="auto">Is <strong>not</strong> colored in <strong>green</strong>. This is quite <strong>normal</strong> as your regex is <strong><code>\$(?=\w)</code></strong>. I suppose that the <strong>correct</strong> regex should be, in this case, <strong><code>\$(?=[\w(])</code></strong></p>
<p dir="auto">So, it’s <strong>not</strong> a limitation of the <a class="plugin-mentions-user plugin-mentions-a" href="/user/ekopalypse" aria-label="Profile: Ekopalypse">@<bdi>Ekopalypse</bdi></a>’s plugin !!</p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/87395</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/87395</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Sat, 24 Jun 2023 23:55:51 GMT</pubDate></item><item><title><![CDATA[Reply to How to change default Powershell language so &quot;$&quot; is Green on Sat, 24 Jun 2023 16:31:31 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/cooly0" aria-label="Profile: Cooly0">@<bdi>Cooly0</bdi></a><br />
If your goal is to only color the <code>$</code> itself green and not the rest of the variable, I’d recommend using the <a href="https://github.com/Ekopalypse/EnhanceAnyLexer" rel="nofollow ugc">EnhanceAnyLexer</a> plugin.</p>
<p dir="auto">Just use</p>
<pre><code>[powershell]
; $ in variable names is green
0x00c300 = \$(?=\w)
; just comment out, seems to work best for non-UDLs
; excluded_styles = 0,1,2,3,4,5,6,8,9,10,13,14,15,16
</code></pre>
<p dir="auto">in <code>%AppData%\Roaming\Notepad++\plugins\Config\EnhanceAnyLexer\EnhanceAnyLexerConfig.ini</code><br />
Result:<br />
<img src="/assets/uploads/files/1687624231808-bad42df7-2e9f-4d46-8860-17ee2a057a64-image.png" alt="bad42df7-2e9f-4d46-8860-17ee2a057a64-image.png" class=" img-fluid img-markdown" /><br />
Unfortunately, this doesn’t colorize <code>$</code> inside of quoted regions. This is outside the scope of EnhanceAnyLexer, it would seem.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/87393</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/87393</guid><dc:creator><![CDATA[Mark Olson]]></dc:creator><pubDate>Sat, 24 Jun 2023 16:31:31 GMT</pubDate></item></channel></rss>