<?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[Goto Matching Brace for HTML&#x2F;XML]]></title><description><![CDATA[<p dir="auto">The Search=&gt;Go to  Matching Brace works fine for the standard <code>() [] {}</code> grouping pairs.  If I have Preferences =&gt; Highlighting =&gt; Highlight Matching Tags (checkbox enabled), I also get “brace highlighting” on the HTML / XML tags.  However, the Go to Matching Brace does not work.</p>
<p dir="auto">The “custom” highlighting of the HTML / XML tags is a Notepad++ add-on, not just from the simple Scintilla <code>SET_BRACEHIGHLIGHT</code> so I guess I didn’t expect it to work.  Seems like it might be quite the code addition to get it working as well so I wasn’t considering an issue / pull request just yet.</p>
<p dir="auto">Has anyone noticed this, was annoyed enough to write a script (e.g., NppExec, PythonScript) to implement it?</p>
<p dir="auto">I have a forward-only rudimentary NppExec script that just matches on the universal find indicator which is what Notepad++ uses to highlight the HTML / XML tags:</p>
<p dir="auto">notepad-plus-plus/PowerEditor/src/ScintillaComponent/xmlMatchedTagsHighlighter.cpp</p>
<pre><code>629:     // Detect if it's a xml/html tag. If yes, Colorize it
630: 	if (getXmlMatchedTagsPos(xmlTags))
631: 	{
632: 		_pEditView-&gt;execute(SCI_SETINDICATORCURRENT, SCE_UNIVERSAL_TAGMATCH);
</code></pre>
<p dir="auto">I tried to use <a href="https://www.scintilla.org/ScintillaDoc.html#SCI_GETSTYLEAT" rel="nofollow ugc"><code>SCI_GETSTYLEAT</code></a> looking for style 34 which in Notepad++ / Scintilla is the <a href="https://www.scintilla.org/ScintillaDoc.html#StyleDefinition" rel="nofollow ugc"><code>STYLE_BRACELIGHT</code></a>, but it never returns a find even though the braces are highlighted:</p>
<p dir="auto"><img src="/assets/uploads/files/1690250807496-9570aca6-68b3-43cc-a7d4-2ca735ddedc2-image.png" alt="9570aca6-68b3-43cc-a7d4-2ca735ddedc2-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Cheers.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/24735/goto-matching-brace-for-html-xml</link><generator>RSS for Node</generator><lastBuildDate>Fri, 07 Aug 2026 22:30:28 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/24735.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 25 Jul 2023 02:06:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Goto Matching Brace for HTML&#x2F;XML on Thu, 27 Jul 2023 00:18:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rdipardo" aria-label="Profile: rdipardo">@<bdi>rdipardo</bdi></a> said in <a href="/post/88150">Goto Matching Brace for HTML/XML</a>:</p>
<blockquote>
<p dir="auto">After sending SCI_ADDSELECTION, if you press the up or down arrow key (not left or right), both carets will remain until you press some other key or cancel the additional selection.</p>
</blockquote>
<p dir="auto">I’ve tried it out and it behaves exactly how I anticipated.  This is great - bravo!</p>
<p dir="auto">Cheers.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/88153</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/88153</guid><dc:creator><![CDATA[Michael Vincent]]></dc:creator><pubDate>Thu, 27 Jul 2023 00:18:06 GMT</pubDate></item><item><title><![CDATA[Reply to Goto Matching Brace for HTML&#x2F;XML on Wed, 26 Jul 2023 22:48:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rdipardo" aria-label="Profile: rdipardo">@<bdi>rdipardo</bdi></a> said in <a href="/post/88150">Goto Matching Brace for HTML/XML</a>:</p>
<blockquote>
<p dir="auto">After sending SCI_ADDSELECTION, if you press the up or down arrow key (not left or right), both carets will remain until you press some other key or cancel the additional selection.</p>
</blockquote>
<p dir="auto">Yes, I noticed that with my script too. I’m used to it when I have multiple caret editing. I just normally pressed the escape key to go back to single caret.</p>
<p dir="auto">Cheers.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/88151</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/88151</guid><dc:creator><![CDATA[Michael Vincent]]></dc:creator><pubDate>Wed, 26 Jul 2023 22:48:00 GMT</pubDate></item><item><title><![CDATA[Reply to Goto Matching Brace for HTML&#x2F;XML on Wed, 26 Jul 2023 22:42:39 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/michael-vincent" aria-label="Profile: Michael-Vincent">@<bdi>Michael-Vincent</bdi></a> said in <a href="/post/88133">Goto Matching Brace for HTML/XML</a>:</p>
<blockquote>
<p dir="auto">There is no such limitation programmatically.</p>
</blockquote>
<p dir="auto">I see that now, except for one subtle edge case. After sending <code>SCI_ADDSELECTION</code>, if you press the up or down arrow key (<em>not</em> left or right), both carets will remain until you press some other key or cancel the additional selection.</p>
<p dir="auto">I’m not able to trap <code>VK_UP</code> or <code>VK_DOWN</code> becasue those keys don’t count as <a href="https://www.scintilla.org/ScintillaDoc.html#SCN_CHARADDED" rel="nofollow ugc">SC_CHARACTERSOURCE_DIRECT_INPUT</a>, and the plugin’s key listener is deliberately conservative about the type of <code>characterSource</code> it acts on (to prevent <a href="https://github.com/rdipardo/nppHTMLTag/commit/85442c31723d40fc13c24913ac1ac0e68c84ff99" rel="nofollow ugc">auto decoding</a> from being too disruptive).</p>
<p dir="auto">If it becomes a real problem, the About dialog has a clickable link to the bug tracker.</p>
<ul>
<li><a href="https://github.com/rdipardo/nppHTMLTag/releases/tag/v1.4.1" rel="nofollow ugc">https://github.com/rdipardo/nppHTMLTag/releases/tag/v1.4.1</a></li>
<li><a href="https://bitbucket.org/rdipardo/htmltag/src/v1.4.1/NEWS.textile" rel="nofollow ugc">https://bitbucket.org/rdipardo/htmltag/src/v1.4.1/NEWS.textile</a></li>
</ul>
]]></description><link>https://community.notepad-plus-plus.org/post/88150</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/88150</guid><dc:creator><![CDATA[rdipardo]]></dc:creator><pubDate>Wed, 26 Jul 2023 22:42:39 GMT</pubDate></item><item><title><![CDATA[Reply to Goto Matching Brace for HTML&#x2F;XML on Wed, 26 Jul 2023 12:07:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rdipardo" aria-label="Profile: rdipardo">@<bdi>rdipardo</bdi></a> said in <a href="/post/88124">Goto Matching Brace for HTML/XML</a>:</p>
<blockquote>
<p dir="auto">a workaround for the current limitation to mouse-guided selections only)</p>
</blockquote>
<p dir="auto">There is no such limitation programmatically.  You just need to use <a href="https://www.scintilla.org/ScintillaDoc.html#SCI_SETSELECTION" rel="nofollow ugc"><code>SCI_SETSELECTION</code></a> and <a href="https://www.scintilla.org/ScintillaDoc.html#SCI_ADDSELECTION" rel="nofollow ugc"><code>SCI_ADDSELECTION</code></a> to create the multi-caret editing on the two tags - begin and end.  My NppExec script above does exactly that.</p>
<p dir="auto">Cheers.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/88133</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/88133</guid><dc:creator><![CDATA[Michael Vincent]]></dc:creator><pubDate>Wed, 26 Jul 2023 12:07:34 GMT</pubDate></item><item><title><![CDATA[Reply to Goto Matching Brace for HTML&#x2F;XML on Wed, 26 Jul 2023 02:27:53 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto">Correct.  So I take it my feature request:</p>
<blockquote>
<p dir="auto">If I document this as a feature request Issue on the HTMLTag GitHub, would there be a slight chance of adding that?</p>
<p dir="auto">I’d consider a PR myself, but alas, I don’t know Pascal.</p>
</blockquote>
<p dir="auto">won’t be considered?</p>
</blockquote>
<p dir="auto">Come to I think of it, someone <a href="https://fossil.2of4.net/npp_htmltag/tktview/41117e59c3" rel="nofollow ugc">asked a while back</a> if HTML Tag could select both matching tags at once. If that were combined with multi-caret editing (with a workaround for the <a href="https://npp-user-manual.org/docs/editing/#multi-editing:~:text=available%20via%20mouse%20usage%20only" rel="nofollow ugc">current limitation to mouse-guided selections only</a>), we might have a decent alternative to tag renaming in VS Code . . . 🤔</p>
]]></description><link>https://community.notepad-plus-plus.org/post/88124</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/88124</guid><dc:creator><![CDATA[rdipardo]]></dc:creator><pubDate>Wed, 26 Jul 2023 02:27:53 GMT</pubDate></item><item><title><![CDATA[Reply to Goto Matching Brace for HTML&#x2F;XML on Wed, 26 Jul 2023 02:09:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rdipardo" aria-label="Profile: rdipardo">@<bdi>rdipardo</bdi></a></p>
<p dir="auto">Correct.  So I take it my feature request:</p>
<blockquote>
<p dir="auto">If I document this as a feature request Issue on the HTMLTag GitHub, would there be a slight chance of adding that?</p>
<p dir="auto">I’d consider a PR myself, but alas, I don’t know Pascal.</p>
</blockquote>
<p dir="auto">won’t be considered?</p>
<p dir="auto">Here is my hacked NppExec script.  It does “basically” what I want, but uses folding to find the matching tag, not ideal.</p>
<p dir="auto">Note it does not handle if there are multiple of the same tag on the same line:</p>
<pre><code>::selectMatchingTag
NPP_CONSOLE keep

NPP_CONSOLE disable
NPP_EXEC lang
NPP_CONSOLE enable
IF "$(LANGNAME)"=="XML" GOTO START
IF "$(LANGNAME)"=="HTML" GOTO START
NPP_MENUCOMMAND Search\Go to Matching Brace
GOTO END

:START
SCI_SENDMSG SCI_GETCURRENTPOS
SET LOCAL STARTPOS = $(MSG_RESULT)
SCI_SENDMSG SCI_INDICATORVALUEAT 27 $(STARTPOS)
SET LOCAL CURRINDIC = $(MSG_RESULT)

IF "$(CURRINDIC)"!="1" GOTO END

SET LOCAL REVERSE = 0
SET LOCAL STARTTAGLINE = $(CURRENT_LINE)
SCI_SENDMSG SCI_GETLASTCHILD $(CURRENT_LINE) -1
SET LOCAL ENDTAGLINE = $(MSG_RESULT)
IF $(ENDTAGLINE)==$(CURRENT_LINE) THEN
    SET LOCAL REVERSE = 1
    SET LOCAL ENDTAGLINE = $(STARTTAGLINE)
    SCI_SENDMSG SCI_GETFOLDPARENT $(CURRENT_LINE)
    SET LOCAL STARTTAGLINE = $(MSG_RESULT)
ENDIF

// CURRENT_WORD automatically selects it as well
SET LOCAL STARTTAG = $(CURRENT_WORD)
SCI_SENDMSG SCI_GETSELECTIONSTART
SET LOCAL STARTTAGSTARTPOS = $(MSG_RESULT)
SCI_SENDMSG SCI_GETSELECTIONEND
SET LOCAL STARTTAGENDPOS = $(MSG_RESULT)

IF $(REVERSE)==0 THEN
    SCI_SENDMSG SCI_POSITIONFROMLINE $(ENDTAGLINE)
    SET LOCAL ENDTAGSTARTPOS = $(MSG_RESULT)
    SCI_SENDMSG SCI_GETLINEENDPOSITION $(ENDTAGLINE)
    SET LOCAL ENDTAGENDPOS = $(MSG_RESULT)

    SCI_SENDMSG SCI_SETSELECTIONSTART $(ENDTAGSTARTPOS)
    SCI_SENDMSG SCI_SETSELECTIONEND $(ENDTAGENDPOS)

    SCI_FIND "NPE_SF_WHOLEWORD | NPE_SF_SETSEL | NPE_SF_INSELECTION" &lt;/$(STARTTAG)&gt;
    IF $(MSG_RESULT) == -1 THEN
        GOTO END
    ENDIF

    SCI_SENDMSG SCI_GETSELECTIONSTART
    SET LOCAL ENDTAGSTARTPOS ~ $(MSG_RESULT) + 2
    SCI_SENDMSG SCI_GETSELECTIONEND
    SET LOCAL ENDTAGENDPOS ~ $(MSG_RESULT) - 1
ELSE
    SCI_SENDMSG SCI_POSITIONFROMLINE $(STARTTAGLINE)
    SET LOCAL ENDTAGSTARTPOS = $(MSG_RESULT)
    SCI_SENDMSG SCI_GETLINEENDPOSITION $(STARTTAGLINE)
    SET LOCAL ENDTAGENDPOS = $(MSG_RESULT)

    SCI_SENDMSG SCI_SETSELECTIONSTART $(ENDTAGSTARTPOS)
    SCI_SENDMSG SCI_SETSELECTIONEND $(ENDTAGENDPOS)

    SCI_FIND "NPE_SF_WHOLEWORD | NPE_SF_SETSEL | NPE_SF_INSELECTION" &lt;$(STARTTAG)
    IF $(MSG_RESULT) == -1 THEN
        GOTO END
    ENDIF

    SCI_SENDMSG SCI_GETSELECTIONSTART
    SET LOCAL ENDTAGSTARTPOS ~ $(MSG_RESULT) + 1
    SCI_SENDMSG SCI_GETSELECTIONEND
    SET LOCAL ENDTAGENDPOS = $(MSG_RESULT)
ENDIF

// ECHO $(STARTTAGLINE) ($(STARTTAGSTARTPOS)-$(STARTTAGENDPOS)) -&gt; $(ENDTAGLINE) ($(ENDTAGSTARTPOS)-$(ENDTAGENDPOS))

// SCI_SENDMSG SCI_GOTOPOS $(ENDTAGSTARTPOS)
SCI_SENDMSG SCI_SETSELECTION $(STARTTAGENDPOS) $(STARTTAGSTARTPOS)
SCI_SENDMSG SCI_ADDSELECTION $(ENDTAGENDPOS) $(ENDTAGSTARTPOS)

:END
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/88122</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/88122</guid><dc:creator><![CDATA[Michael Vincent]]></dc:creator><pubDate>Wed, 26 Jul 2023 02:09:04 GMT</pubDate></item><item><title><![CDATA[Reply to Goto Matching Brace for HTML&#x2F;XML on Wed, 26 Jul 2023 02:02:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/michael-vincent" aria-label="Profile: Michael-Vincent">@<bdi>Michael-Vincent</bdi></a> said in <a href="/post/88116">Goto Matching Brace for HTML/XML</a>:</p>
<blockquote>
<p dir="auto">I want to do this:</p>
</blockquote>
<p dir="auto">Your GIF shows a <a href="https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-rename-tag" rel="nofollow ugc">VS Code extension</a> which has been superseded by the <a href="https://github.com/microsoft/vscode-docs/blob/vnext/release-notes/v1_41.md#html-rename-tags" rel="nofollow ugc">rename tag feature</a> (basically <code>F2</code>, “rename all occurrences,” but only affecting the matching tag):</p>
<p dir="auto"><img src="https://media.githubusercontent.com/media/microsoft/vscode-docs/vnext/release-notes/images/1_41/html-rename.gif" alt="vscode-v141-tag-rename" class=" img-fluid img-markdown" /></p>
<p dir="auto">I think the closest you could get with Notepad++ right now would be manual selection with <a href="https://npp-user-manual.org/docs/editing/#multi-editing" rel="nofollow ugc">multi-editing</a> enabled, e.g.</p>
<p dir="auto"><img src="https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExZHh4djJneWI2bG5odXMxZzF5aDI2bTd5MDRqMzhqeW5qc3huc3hkdyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/CPNGFJf90zawUadQwA/giphy.gif" alt="npp-multi-replace" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.notepad-plus-plus.org/post/88121</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/88121</guid><dc:creator><![CDATA[rdipardo]]></dc:creator><pubDate>Wed, 26 Jul 2023 02:02:16 GMT</pubDate></item><item><title><![CDATA[Reply to Goto Matching Brace for HTML&#x2F;XML on Wed, 26 Jul 2023 01:42:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/michael-vincent" aria-label="Profile: Michael-Vincent">@<bdi>Michael-Vincent</bdi></a> ,<br />
Thanks for that clarification. So you want to be able to select the word in the opening and closing tag, which will allow you, at the first key press, to insert in front of the tag at both positions to insert the text you type.  Correct?  That’s interesting and maybe that’s a worthwhile capability that the developers may like to include if it doesn’t already exist in a magic key. :-)</p>
<p dir="auto"><strong>Edit:</strong> Again, since I don’t have the experience, but couldn’t a Python script do that for you?  Find the tags, highlight them, put insertion points at the beginning of both of the tags text, and then insert the keypresses. Sounds doable. :-)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/88118</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/88118</guid><dc:creator><![CDATA[Lycan Thrope]]></dc:creator><pubDate>Wed, 26 Jul 2023 01:42:18 GMT</pubDate></item><item><title><![CDATA[Reply to Goto Matching Brace for HTML&#x2F;XML on Wed, 26 Jul 2023 01:18:31 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lycan-thrope" aria-label="Profile: Lycan-Thrope">@<bdi>Lycan-Thrope</bdi></a> said in <a href="/post/88113">Goto Matching Brace for HTML/XML</a>:</p>
<blockquote>
<p dir="auto">in your code</p>
</blockquote>
<p dir="auto">It’s not my code - it’s Notepad++ code “notepad-plus-plus/PowerEditor/src/ScintillaComponent/xmlMatchedTagsHighlighter.cpp”</p>
<p dir="auto">A picture worth a thousand words, I want to do this:</p>
<p dir="auto"><img src="/assets/uploads/files/1690334191836-3e5aa3d1-220e-4160-b5ac-48d75dc2834e-image.png" alt="3e5aa3d1-220e-4160-b5ac-48d75dc2834e-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">(source:  <a href="https://github.com/formulahendry/vscode-auto-rename-tag/raw/HEAD/images/usage.gif" rel="nofollow ugc">https://github.com/formulahendry/vscode-auto-rename-tag/raw/HEAD/images/usage.gif</a>)</p>
<p dir="auto">Seems the pasted picture isn’t animated, but the link to the original is.  I’m happy to press some magic key-combo as well before typing to “Select matching HTML/XML tag”.</p>
<p dir="auto">Cheers.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/88116</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/88116</guid><dc:creator><![CDATA[Michael Vincent]]></dc:creator><pubDate>Wed, 26 Jul 2023 01:18:31 GMT</pubDate></item><item><title><![CDATA[Reply to Goto Matching Brace for HTML&#x2F;XML on Wed, 26 Jul 2023 00:52:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/michael-vincent" aria-label="Profile: Michael-Vincent">@<bdi>Michael-Vincent</bdi></a> ,<br />
I’ve read the other responses with interest, and maybe I’m out in left field on this, however, what I see in your code, is that you’re using if, to check for what I presume is the matching tag position. Correct?</p>
<p dir="auto">And if that is the case, and I’m spitballing here, it looks like to be, that your code upon a successful find, is following the next instruction, which is: <code>_pEditView-&gt;execute(SCI_SETINDICATORCURRENT, SCE_UNIVERSAL_TAGMATCH);</code></p>
<p dir="auto">Unless that if condition is supposed to return a true/false logic, or an actual position, it seems like it’s doing what you want, but it’s just not returning a value to you, and since I can’t see any other code, such as maybe a variable to hold that value so you can evaluate it, isn’t the code doing what you want?</p>
<p dir="auto">Like I said, I’m not real experienced with doing anything with the Scintilla or Editor messages, but from my humble programming capability, I’m just pointing out what I normally would expect to see regards code.  For instance, in a, VM type environment  like dBASE’s command window, you can issue code to check for things, and it will do the job, but if you didn’t give it a variable to hold that value and then display it, it will do what you ask without returning that value visibly? Understand what I’m taking note of?</p>
<p dir="auto">I guess I need to try and dabble in this to see what’s going on, but from an outside perspective, that’s what looks like is happening to me. :-)</p>
<p dir="auto"><strong>Edit:</strong> I should have read past <a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a> 's response. :-), now I see what you’re asking about, but I think what you’re saying you want it to do, seems to me to be counterproductive to finding the matching closing tag, if it also highlights unrelated tags that aren’t really that specific tag’s closing tag. Understand what I’m getting at?  Sorry if I misunderstood the desired end result as it wasn’t really clear to me in your original post.  In hindsight, if it’s possible, wouldn’t you want that condition to loop and find all those positions as well as starting positions and saved into an array so you can re-reference them and color them in sequence of matches?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/88113</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/88113</guid><dc:creator><![CDATA[Lycan Thrope]]></dc:creator><pubDate>Wed, 26 Jul 2023 00:52:00 GMT</pubDate></item><item><title><![CDATA[Reply to Goto Matching Brace for HTML&#x2F;XML on Tue, 25 Jul 2023 20:53:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rdipardo" aria-label="Profile: rdipardo">@<bdi>rdipardo</bdi></a> said in <a href="/post/88107">Goto Matching Brace for HTML/XML</a>:</p>
<blockquote>
<p dir="auto">That’s basically how the HTML Tag plugin implements tag jumping, using a dictionary datatype called TStringList.</p>
</blockquote>
<p dir="auto">And that sir is 99% of what I’m looking for!  That’s great.  The only thing more I could ask for is that instead of just jumping from tag open to tag close, would be to highlight the tag open text and tag close text so that I could easily rename them.  I’m thinking more in the XML context here, where tag names are essentially made up based on context and during development of a schema, are changing.</p>
<p dir="auto">So to spell it out:</p>
<pre><code>&lt;outer0&gt;
&lt;mytag name="0"&gt;
    &lt;mytag name="1"&gt;
    &lt;/mytag&gt;
&lt;/mytag&gt;
&lt;/outer0&gt;
</code></pre>
<p dir="auto">putting the cursor on the first <code>mytag</code> (the one with the <code>name="0"</code> parameter) and pressing the “magic hot-key” should select both <code>mytag</code> with the cursor and the matching one (the last one in this case) with multi-selection.  So then, typing a new name would overwrite both instances with the new tag.</p>
<p dir="auto">Does that make sense?  If I document this as a feature request Issue on the HTMLTag GitHub, would there be a slight chance of adding that?</p>
<p dir="auto">I’d consider a PR myself, but alas, I don’t know Pascal.</p>
<p dir="auto">Cheers.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/88110</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/88110</guid><dc:creator><![CDATA[Michael Vincent]]></dc:creator><pubDate>Tue, 25 Jul 2023 20:53:36 GMT</pubDate></item><item><title><![CDATA[Reply to Goto Matching Brace for HTML&#x2F;XML on Tue, 25 Jul 2023 18:13:17 GMT]]></title><description><![CDATA[<p dir="auto">@Victorel-Petrovich said in <a href="/post/88090">Goto Matching Brace for HTML/XML</a>:</p>
<blockquote>
<p dir="auto">how about Goto next node/fold at the same level? Or previous?</p>
</blockquote>
<p dir="auto">It’s possible with Scintilla’s current APIs, in any document with active code folding: <a href="https://sourceforge.net/p/scintilla/feature-requests/1487/#4196/ab81/b4d7" rel="nofollow ugc">https://sourceforge.net/p/scintilla/feature-requests/1487/#4196/ab81/b4d7</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/88108</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/88108</guid><dc:creator><![CDATA[rdipardo]]></dc:creator><pubDate>Tue, 25 Jul 2023 18:13:17 GMT</pubDate></item><item><title><![CDATA[Reply to Goto Matching Brace for HTML&#x2F;XML on Tue, 25 Jul 2023 18:14:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/michael-vincent" aria-label="Profile: Michael-Vincent">@<bdi>Michael-Vincent</bdi></a> said in <a href="/post/88089">Goto Matching Brace for HTML/XML</a>:</p>
<blockquote>
<p dir="auto">The Search=&gt;Go to  Matching Brace works fine for the standard <code>() [] {}</code> grouping pairs.</p>
</blockquote>
<p dir="auto">Angled brackets are among the “braces” that Scintilla’s own <code>SCI_BRACEMATCH</code> can find:</p>
<blockquote>
<p dir="auto">The <strong>SCI_BRACEMATCH</strong> message finds a corresponding matching brace given pos, the position of one brace. The brace characters handled are ‘(’, ‘)’, ‘[’, ‘]’, ‘{’, ‘}’, ‘&lt;’, and ‘&gt;’. The search is forwards from an opening brace and backwards from a closing brace.</p>
<p dir="auto"><a href="https://www.scintilla.org/ScintillaDoc.html#SCI_BRACEMATCH" rel="nofollow ugc">https://www.scintilla.org/ScintillaDoc.html#SCI_BRACEMATCH</a></p>
</blockquote>
<p dir="auto">This obviously won’t be self-sufficient for navigating SGML documents, but it could be useful. If you know the start and end positions of the opening tag (by matching the first <code>&lt;</code> with the first <code>&gt;</code>), you can read the tag’s name and search the document for the closing tag, then send <code>SCI_BRACEMATCH</code> again to find where the closing tag begins and ends. The 4 co-ordinates could be held in a dictionary, e.g.</p>
<pre><code class="language-python">tags = {
    '&lt;div&gt;' :  (open_start, open_end),
    '&lt;/div&gt;':  (close_start, close_end)
}
</code></pre>
<p dir="auto">That’s basically how the HTML Tag plugin implements <a href="https://github.com/rdipardo/nppHTMLTag/blob/461a843325a54c3c791516bae831883e2fcd337f/src/U_HTMLTagFinder.pas#L144" rel="nofollow ugc">tag jumping</a>, using a dictionary datatype called <code>TStringList</code>.</p>
<blockquote>
<p dir="auto">I tried to use <a href="https://www.scintilla.org/ScintillaDoc.html#SCI_GETSTYLEAT" rel="nofollow ugc"><code>SCI_GETSTYLEAT</code></a> looking for style 34 which in Notepad++ / Scintilla is the <a href="https://www.scintilla.org/ScintillaDoc.html#StyleDefinition" rel="nofollow ugc"><code>STYLE_BRACELIGHT</code></a></p>
</blockquote>
<p dir="auto">I think <code>SCI_GETSTYLEAT</code> can only tell you the lexical state (or “style bytes”) associated with the text at the given position. <code>STYLE_BRACELIGHT</code> is a kind of overlay, possibly extractable with the right bit mask. Never tried it, though.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/88107</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/88107</guid><dc:creator><![CDATA[rdipardo]]></dc:creator><pubDate>Tue, 25 Jul 2023 18:14:55 GMT</pubDate></item><item><title><![CDATA[Reply to Goto Matching Brace for HTML&#x2F;XML on Tue, 25 Jul 2023 13:03:24 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto">how about Goto next node/fold at the same level? Or previous? Then also Goto parent node.<br />
These would be useful in any languae with hierarchical structure (not just html/xml).</p>
</blockquote>
<p dir="auto">Such behavior can be scripted for languages of interest.  For example, I have scripts that jump to the next/previous entry at the same indent level as the current, as well as the next/previous “outdent” level.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/88101</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/88101</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Tue, 25 Jul 2023 13:03:24 GMT</pubDate></item><item><title><![CDATA[Reply to Goto Matching Brace for HTML&#x2F;XML on Tue, 25 Jul 2023 12:56:36 GMT]]></title><description><![CDATA[<p dir="auto">@Victorel-Petrovich said in <a href="/post/88090">Goto Matching Brace for HTML/XML</a>:</p>
<blockquote>
<p dir="auto">I guess you meant “tag hightlighting” and you want “Goto Matching Tag”,  correct?</p>
</blockquote>
<p dir="auto">He meant what he said.  The default English translation (which is the nomenclature we use when helping anyone in the forum) uses the <em>exact</em> words that <a class="plugin-mentions-user plugin-mentions-a" href="/user/michael-vincent" aria-label="Profile: Michael-Vincent">@<bdi>Michael-Vincent</bdi></a> used for the preferences:<br />
<img src="/assets/uploads/files/1690289557086-a02280eb-8dc6-438b-85aa-9d83158d17f6-image.png" alt="a02280eb-8dc6-438b-85aa-9d83158d17f6-image.png" class=" img-fluid img-markdown" /></p>
<blockquote>
<p dir="auto">Related: how about Goto next node/fold at the same level? Or previous? Then also Goto parent node.<br />
These would be useful in any languae with hierarchical structure (not just html/xml).</p>
</blockquote>
<p dir="auto">That would have to be implemented in each of the individual lexers for each language, because each language has a different definition of “node” or “level” or whatever.  Notepad++ uses Scintilla’s “Lexilla” library for defining the lexer behavior, so you would have to ask the Lexilla developers to add that feature to all of the languages that you care about, and then patiently wait for them to implement that feature (if they ever do) and then patiently wait for Notepad++ to update to the newer version of Scintilla/Lexilla which includes those new features.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/88098</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/88098</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Tue, 25 Jul 2023 12:56:36 GMT</pubDate></item><item><title><![CDATA[Reply to Goto Matching Brace for HTML&#x2F;XML on Tue, 25 Jul 2023 03:35:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/michael-vincent" aria-label="Profile: Michael-Vincent">@<bdi>Michael-Vincent</bdi></a> said in <a href="/post/88089">Goto Matching Brace for HTML/XML</a>:</p>
<blockquote>
<p dir="auto">If I have Preferences =&gt; Highlighting =&gt; Highlight Matching Tags (checkbox enabled), I also get “brace highlighting” on the HTML / XML tags.</p>
</blockquote>
<p dir="auto">I guess you meant “tag hightlighting” and you want “Goto Matching Tag”,  correct?</p>
<p dir="auto">Related: how about Goto next node/fold at the same level? Or previous? Then also Goto parent node.<br />
These would be useful in any languae with hierarchical structure (not just html/xml).</p>
]]></description><link>https://community.notepad-plus-plus.org/post/88090</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/88090</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Tue, 25 Jul 2023 03:35:09 GMT</pubDate></item></channel></rss>