<?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[Lua: How to have notepad + highlight the IF and END of a codeblock?]]></title><description><![CDATA[<p dir="auto">I searched google for an example, but I couldn’t find it. Is there a way to make notepad + highlight the if and end of a codeblock if I were to doble click one or the other?</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/20666/lua-how-to-have-notepad-highlight-the-if-and-end-of-a-codeblock</link><generator>RSS for Node</generator><lastBuildDate>Tue, 12 May 2026 02:39:47 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/20666.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 01 Feb 2021 21:15:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Lua: How to have notepad + highlight the IF and END of a codeblock? on Tue, 02 Feb 2021 10:20:11 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/themaster1124" aria-label="Profile: themaster1124">@<bdi>themaster1124</bdi></a>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: peterjones">@<bdi>peterjones</bdi></a>, and <strong>All</strong>,</p>
<p dir="auto">May be, using the <strong><code>View &gt; Show symbol &gt; Show Indent Guide</code></strong> could be <strong>useful</strong>, too ?</p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/62415</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/62415</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Tue, 02 Feb 2021 10:20:11 GMT</pubDate></item><item><title><![CDATA[Reply to Lua: How to have notepad + highlight the IF and END of a codeblock? on Mon, 01 Feb 2021 22:56:37 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></p>
<p dir="auto">I might beable to “trick” notepad ++ into believing the “then” is a { and the “end” is a }, then add them into the sentax preferences.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/62409</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/62409</guid><dc:creator><![CDATA[themaster1124]]></dc:creator><pubDate>Mon, 01 Feb 2021 22:56:37 GMT</pubDate></item><item><title><![CDATA[Reply to Lua: How to have notepad + highlight the IF and END of a codeblock? on Mon, 01 Feb 2021 21:45:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/themaster1124" aria-label="Profile: themaster1124">@<bdi>themaster1124</bdi></a> ,</p>
<p dir="auto">Notepad++ has brace-match highlighting (for parenthesis, brackets, or braces), but I don’t know of a way to make it do matching on non-brace open/close syntax like if/end.</p>
<p dir="auto">As a workaround, if your cursor is inside an if/end block, the folding level on the left is highlighted red.<br />
<img src="/assets/uploads/files/1612215660341-ee5d7e7e-862b-4e15-ba9c-0eb58191d044-image.png" alt="ee5d7e7e-862b-4e15-ba9c-0eb58191d044-image.png" class=" img-fluid img-markdown" /><br />
So you could collapse the current fold, move the cursor to the line <em>after</em> the fold, then unfold, which should leave your cursor just after the <code>end</code>.  Not ideal, but it’s something.</p>
<p dir="auto">Someone else might know of a way to abuse the Highlight Matching Tags feature or something similar.  Or there are scripting plugins which can add functionality (we often recommend PythonScript, but since you are writing in Lua, you might be more comfortable with LuaScript) – they embed a programming-language interpreter in the Notepad++ environment, and the script can manipulate the contents and highlighting of the editor windows in Notepad++.  There is good documentation with either of the plugins I mentioned, and someone who is already comfortable with Lua would probably be able to figure out how to search for the matching tag.  If you want to go that route, feel free to share what you’ve tried and ask for help if you need it.</p>
<p dir="auto">But no, as far as I know, the exact feature you are looking for is not natively in Notepad++.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/62407</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/62407</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Mon, 01 Feb 2021 21:45:16 GMT</pubDate></item></channel></rss>