<?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[Copy entire code group?]]></title><description><![CDATA[<p dir="auto">Is there a way to copy grouped text of code? An example of what I mean is the + and - that allows collapsing a group of code such as when we have an html table <code>&lt;table&gt;tons of code&lt;/table&gt;</code> can be collapsed so it’s hidden. That’s what I’m referring to as a group, I don’t know what the technical term for it is if group isn’t the term for it.</p>
<p dir="auto">Is there a way to easily select an entire tag group from <code>&lt;open&gt; to &lt;/close&gt;</code>? Maybe a key combination after clicking on the + or  - ?</p>
<p dir="auto">With all the helpful features in notepad++ I assume this is possible but I can’t figure out how to do it if it is possible.</p>
<p dir="auto">I have found that we can:</p>
<ol>
<li>Place the cursor on the line we want to start the selection at.</li>
<li>Right-click and select Begin/End Selection.</li>
<li>Click on the &lt;tag&gt; so it highlights where that tag closes.</li>
<li>Scroll to the highlighted &lt;/tag&gt; and repeat step 2.</li>
</ol>
<p dir="auto">Is there a faster and easier way of selecting the whole tag than doing it this way?</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/22965/copy-entire-code-group</link><generator>RSS for Node</generator><lastBuildDate>Wed, 13 May 2026 03:37:24 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/22965.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 08 May 2022 20:56:33 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Copy entire code group? on Sat, 14 May 2022 16:29:37 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/76798">Copy entire code group?</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/arel3" aria-label="Profile: arel3">@<bdi>arel3</bdi></a>,<br />
Have you heard about the <a href="https://community.notepad-plus-plus.org/topic/22503/new-version-of-html-tag">HTML Tag plugin</a>?</p>
<p dir="auto"><a href="https://gifyu.com/image/Ss5l0" rel="nofollow ugc"><img src="https://camo.nodebb.org/bef43d9479d956cb12ed7fecc75d07bbd94bfa1d?url=https%3A%2F%2Fs8.gifyu.com%2Fimages%2Fnpp_841_x64_htmltag_v123.gif" alt="npp_841_x64_htmltag_v123.gif" class=" img-fluid img-markdown" /></a></p>
</blockquote>
<p dir="auto">This is the solution, thank you!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/76818</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76818</guid><dc:creator><![CDATA[arel3]]></dc:creator><pubDate>Sat, 14 May 2022 16:29:37 GMT</pubDate></item><item><title><![CDATA[Reply to Copy entire code group? on Fri, 13 May 2022 01:02:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/arel3" aria-label="Profile: arel3">@<bdi>arel3</bdi></a>,<br />
Have you heard about the <a href="https://community.notepad-plus-plus.org/topic/22503/new-version-of-html-tag">HTML Tag plugin</a>?</p>
<p dir="auto"><a href="https://gifyu.com/image/Ss5l0" rel="nofollow ugc"><img src="https://camo.nodebb.org/bef43d9479d956cb12ed7fecc75d07bbd94bfa1d?url=https%3A%2F%2Fs8.gifyu.com%2Fimages%2Fnpp_841_x64_htmltag_v123.gif" alt="npp_841_x64_htmltag_v123.gif" class=" img-fluid img-markdown" /></a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/76798</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76798</guid><dc:creator><![CDATA[rdipardo]]></dc:creator><pubDate>Fri, 13 May 2022 01:02:06 GMT</pubDate></item><item><title><![CDATA[Reply to Copy entire code group? on Fri, 13 May 2022 00:27:03 GMT]]></title><description><![CDATA[<p dir="auto">Wow, thank you <a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: peterjones">@<bdi>peterjones</bdi></a>!<br />
I do mainly use the program for markup languages. I had more expectation that being able to do this was already possible, not that someone would put the time in to write a script for it if it didn’t. Thank you!!!<br />
I’m sure others can make use of this too since you’ve made it capable of working with any foldable text.</p>
<p dir="auto">Yes, that’s what I meant; foldable text seems to be the term I didn’t know.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/76797</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76797</guid><dc:creator><![CDATA[arel3]]></dc:creator><pubDate>Fri, 13 May 2022 00:27:03 GMT</pubDate></item><item><title><![CDATA[Reply to Copy entire code group? on Mon, 09 May 2022 19:05:14 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> , <a class="plugin-mentions-user plugin-mentions-a" href="/user/arel3" aria-label="Profile: arel3">@<bdi>arel3</bdi></a> , <em>et alia</em>,</p>
<p dir="auto">The other benefit of the macro sequence, compared to <strong>Search &gt; Select All Between Matching Braces</strong> or my earlier script, is that it will work for <em>any</em> foldable chunk of text, whether it’s the <code>{ ... }</code> code block in C/C++ and Perl, or the indented code block in Python, or the <code>&lt;tag&gt;...&lt;/endtag&gt;</code> in HTML/XML.  It will even work in the simple UDL code-folding, if you have properly defined that in your UDL.</p>
<p dir="auto">So that’s graduated to being something that I think I might be able to incorporate into my workflow.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/76707</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76707</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Mon, 09 May 2022 19:05:14 GMT</pubDate></item><item><title><![CDATA[Reply to Copy entire code group? on Mon, 09 May 2022 18:55:28 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/76705">Copy entire code group?</a>:</p>
<blockquote>
<p dir="auto">Maybe I’m missing something,</p>
</blockquote>
<p dir="auto">Nope, I think I was missing something.  That’s much more obvious, and macro recordable: Fold, <code>Alt+Home</code>, <code>Alt+Home</code> (*), select-line-down, copy, arrow up, unfold.</p>
<pre><code>        &lt;Macro name="CopyCurrentTagWithContents" Ctrl="yes" Alt="yes" Shift="yes" Key="67"&gt;
            &lt;Action type="0" message="2172" wParam="0" lParam="0" sParam="COMMENT: 44030 = IDM_VIEW_FOLD_CURRENT" /&gt;
            &lt;Action type="2" message="0" wParam="44030" lParam="0" sParam="" /&gt;
            &lt;Action type="0" message="2172" wParam="0" lParam="0" sParam="COMMENT: 2345:HomeDisplay x2 to make sure at the first line of the collapsed level" /&gt;
            &lt;Action type="0" message="2345" wParam="0" lParam="0" sParam="" /&gt;
            &lt;Action type="0" message="2345" wParam="0" lParam="0" sParam="" /&gt;
            &lt;Action type="0" message="2172" wParam="0" lParam="0" sParam="COMMENT: 2301:LineDownExtend: select the whole block" /&gt;
            &lt;Action type="0" message="2301" wParam="0" lParam="0" sParam="" /&gt;
            &lt;Action type="0" message="2172" wParam="0" lParam="0" sParam="COMMENT: 2178:Copy" /&gt;
            &lt;Action type="0" message="2178" wParam="0" lParam="0" sParam="" /&gt;
            &lt;Action type="0" message="2172" wParam="0" lParam="0" sParam="COMMENT: 2302:LineUp: back to the start of the block" /&gt;
            &lt;Action type="0" message="2302" wParam="0" lParam="0" sParam="" /&gt;
            &lt;Action type="0" message="2172" wParam="0" lParam="0" sParam="COMMENT: 44031 = IDM_VIEW_UNFOLD_CURRENT" /&gt;
            &lt;Action type="2" message="0" wParam="44031" lParam="0" sParam="" /&gt;
        &lt;/Macro&gt;
</code></pre>
<p dir="auto">After recording the macro and assigning it to <code>Ctrl+Alt+Shift+C</code>, and restarting Notepad++, I added in comments to the macro in <code>shortcuts.xml</code> to help it be understandable what’s going on, then I used that macro to grab the macro source out of <code>shortcuts.xml</code>, which made it really easy to prove that it was truly working after restart. ;-)</p>
<p dir="auto">So, instead of installing PythonScript and my almost-good-enough script, you could instead just record that macro yourself.  Or, if you want, follow the sequence:</p>
<ol>
<li>Exit all Notepad++ and restart one instance</li>
<li>Open <code>%AppData%\Notepad++\shortcuts.xml</code> (or your portable or cloud or alternate-location equivalent <code>shortcuts.xml</code>)</li>
<li>In the <code>&lt;Macros&gt;</code> section of the <code>shortcuts.xml</code> file, add the macro code from this post</li>
<li>Save, Exit Notepad++, and restart.</li>
<li>From now on, <code>Ctrl+Alt+Shift+C</code> will run that macro to copy the current tag with its contents.
<ul>
<li>You can use <strong>Macro &gt; Modify Shortcut/Delete Macro</strong> to change the shortcut if you don’t like mine.</li>
</ul>
</li>
</ol>
<p dir="auto">That command might become part of my usage when copying macro source XML into the forum. ;-) So thanks, <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: Alan-Kilborn">@<bdi>Alan-Kilborn</bdi></a> , for the simplified procedure, and to <a class="plugin-mentions-user plugin-mentions-a" href="/user/arel3" aria-label="Profile: arel3">@<bdi>arel3</bdi></a> for asking the question which prompted it.</p>
<p dir="auto">–<br />
*: Why two <code>Alt+Home</code> while recording the macro (aka, two 2345=SCI_HOMEDISPLAY in the macro source)?  Because if your cursor happens to be inside of a folded section of text, the <em>first</em> SCI_HOMEDISPLAY takes you the <em>end</em> of the first (visible) line of the folded section, then the second <code>Alt+Home</code> takes you to the very beginning of the physical line.  <code>Alt+Home</code> will work if you have the default keyboard shortcuts; if you’ve modified it like I have, SCI_HOMEDISPLAY might be a different keystroke for you.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/76706</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76706</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Mon, 09 May 2022 18:55:28 GMT</pubDate></item><item><title><![CDATA[Reply to Copy entire code group? on Mon, 09 May 2022 18:06:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/arel3" aria-label="Profile: arel3">@<bdi>arel3</bdi></a> said in <a href="/post/76689">Copy entire code group?</a>:</p>
<blockquote>
<p dir="auto">An example of what I mean is the + and - that allows collapsing a group of code…</p>
</blockquote>
<p dir="auto">Maybe I’m missing something, but isn’t what the OP is asking about something in the spirit of the following example?:</p>
<ul>
<li>Open <code>langs.xml</code></li>
<li>Collapse line 4 to get a <code>+</code> before it showing in its margin:<br />
<img src="/assets/uploads/files/1652119241683-76f507b8-3d72-45e7-96f4-94f290f93218-image.png" alt="76f507b8-3d72-45e7-96f4-94f290f93218-image.png" class=" img-fluid img-markdown" /></li>
<li>Start selecting on line 4, and go downward, making sure your caret is on line 408 when you stop selecting (but it is only the next <em>visible</em> line downward, so really easy to do):<br />
<img src="/assets/uploads/files/1652119329932-5e71ac98-5bf2-42cc-af27-bf84a2954377-image.png" alt="5e71ac98-5bf2-42cc-af27-bf84a2954377-image.png" class=" img-fluid img-markdown" /></li>
<li>Press Ctrl+c</li>
<li>Move to a new tab</li>
<li>Press Ctrl+v to see that 400-some lines were copied/pasted, between the <code>&lt;Languages&gt;</code> tag and the <code>&lt;/Languages&gt;</code> tag.</li>
</ul>
]]></description><link>https://community.notepad-plus-plus.org/post/76705</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76705</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Mon, 09 May 2022 18:06:28 GMT</pubDate></item><item><title><![CDATA[Reply to Copy entire code group? on Mon, 09 May 2022 17:43:21 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/76703">Copy entire code group?</a>:</p>
<blockquote>
<p dir="auto">I might have a think about that implementation, if I find the time today.</p>
</blockquote>
<p dir="auto">It was interesting enough to me that I took a script that had similar logic and expanded it.</p>
<ol start="0">
<li>Install PythonScript plugin if not already installed (<strong>Plugins &gt; Plugins Admin</strong>, check <code>Python Script</code> then click <strong>Install</strong></li>
<li>Create a new script in PythonScript  (<strong>Plugins &gt; PythonScript &gt; New script</strong>, name = <code>select-current-tag.py</code>)</li>
<li>Paste the contents from below and save</li>
<li>Run <strong>Plugins &gt; PythonScript &gt; Scripts &gt; <code>select-current-tag</code></strong> to run the script.</li>
<li>If you want to assign a keyboard shortcut:
<ol>
<li><strong>Plugins &gt; PythonScript &gt; Configuration…</strong></li>
<li>In <strong>User Scripts</strong>, click on <code>select-current-tag</code> and then the left <strong>Add</strong> button (to add it to the <strong>Menu Items</strong> list on the left)</li>
<li><strong>OK</strong></li>
<li>Exit and Restart Notepad++</li>
<li>Use <strong>Settings &gt; Shortcut Mapper</strong>, <strong>Plugins</strong> tab; filter on <code>Python</code>; the <strong>Modify</strong> the shortcut for <code>select-current-tag</code></li>
</ol>
</li>
</ol>
<p dir="auto">You only have to do step#4 once: after that, every time you start Notepad++, that script will be available through your shortcut.</p>
<p dir="auto">To use it, click on the <code>&lt;tagname</code> or <code>&lt;/tagname</code> then run <strong>Plugins &gt; PythonScript &gt; Scripts &gt; <code>select-current-tag</code></strong> or the keystroke you chose in #4.  This will select from <code>&lt;tagname</code> thru <code>&lt;/tagname&gt;</code>, and then you can easily copy that with Ctrl+C.  Caveats:</p>
<ul>
<li>If you click after a space (for example, on <code>class</code> in <code>&lt;tagname class="..."&gt;</code>), it will not find the tag properly</li>
<li>If you click after the <code>&gt;</code> (for example, after <code>&gt;</code> in <code>&lt;tagname&gt;</code>), it will not find the tag properly</li>
<li>Currently, the script assumes that you want to find the closing tag immediately after the active open tag, or the opening tag immediately before the active close tag.  It does <em>not</em> find balanced tags, because that is hard.  Thus, if you have nested <code>div</code>s, it might not do what you desire.  But Guy made the same assumption, and most HTML tags don’t nest anyway, so except for <code>div</code> and a few others, it’s probably not a big deal.  If it is a big deal to your use case, then let us know, and maybe someone (maybe even me) will be interested enough to modify my script to require balanced tags.</li>
<li>If you have lots of confusing things, like <code>&gt;</code> inside attributes or using <code>&lt;!-- &lt;/div&gt; --&gt;</code> to comment out tags that you want to skip, this <em>won’t</em> handle it.  I am not going to write a whole HTML/XML parser just to satisfy a complicated sequence like that.  If you need something that complicated, a full-blown HTML or XML plugin will be required, and you will need to investigate whether any of the existing plugins already have the select-tag-and-contents feature for you.</li>
</ul>
<pre><code># encoding=utf-8
""" selectCurrentTag: in response to https://community.notepad-plus-plus.org/topic/22965/copy-entire-code-group

Starts at the current position; looks to see if it's `&lt;open`, `&lt;/close`, or neither.
If not neither, then search for the first pair it finds.

TODO: change from  "first pair it finds" to "first balanced pair it finds"
"""

from Npp import editor, notepad, console
#console.show()

class SelectCurrentTag(object):
    class TAGTYPE(object):
        OPEN = 'OPEN'
        CLOSE = 'CLOSE'
        OTHER = None

    #def __init__(self):
    #    self.oldPos = editor.getCurrentPos()
    #    console.write("SelectCurrentTag: initialized\n")

    def getTagWord(self):
        self.oldPos = editor.getCurrentPos()
        self.tagword = editor.getCurrentWord()

        self.tagtype = self.TAGTYPE.OTHER

        self.wordtagpos = [None,None]
        direction = 0
        searchpos = self.oldPos
        #console.write(__file__ + "::" + __name__ + "::{}..{}".format(searchpos, self.oldPos) + "\n")
        while searchpos &gt; 0 and searchpos &lt; editor.getLength():
            c = editor.getCharAt(searchpos)
            if c&lt;0:
                # utf8: first byte&amp;0xC0 is 0xC0; subsequent bytes in the char are 0x80
                # thus, step backword a byte while those aren't start-byte
                while searchpos&gt;0 and c &amp; 0xc0 != 0xc0:
                    searchpos -= 1
                    c = editor.getCharAt(searchpos)
                    q = editor.positionAfter(searchpos)
                    #console.write("\t{}: {}..{}\n".format("searching", searchpos, q))

                #console.write("\t{}: {}..{}\n".format("found", searchpos, q))
                s = editor.getTextRange(searchpos,q).decode('utf-8')
                if len(s)==1:
                    c = ord(s)
                elif len(s)==2:
                    c = 0x10000 + (ord(s[0]) - 0xD800) * 0x400 + (ord(s[1]) - 0xDC00)
                else:
                    c = ord(s)  # will probably give an exception

            elif c&gt;255:
                console.writeError("unknown character {} while searching for \\".format(c))
                s = unichr(c)   # should probably create an exception

            else:
                s = unichr(c)

            #info = "#{0:5}# '{2}' = HEX:0x{1:04X} = DEC:{1} ".format(searchpos, c, s.encode('utf-8') if c not in [13, 10, 0] else 'LINE-ENDING' if c != 0 else 'END-OF-FILE')
            #console.write(info + "\n")

            if c in [0, 10, 13, 8, 32] and direction==0: # nul, newline, horizontal whitespace not allowed when searching for start of the current open/close tag
                self.wordtagpos[direction] = None
                self.tagtype = self.TAGTYPE.OTHER
                break

            if s == '&lt;' and direction==0:
                self.wordtagpos[direction] = searchpos
                if editor.getTextRange(searchpos+1,searchpos+2) == '/':
                    self.tagtype = self.TAGTYPE.CLOSE
                else:
                    self.tagtype = self.TAGTYPE.OPEN

                # since I found it, start from original and change direction
                searchpos = self.oldPos - 1
                direction = 1 # was: break

            if s == '&gt;' and direction==1:
                self.wordtagpos[direction] = searchpos+1  # include the '&gt;'
                if self.tagword == '':

                    def assn(m):
                        self.tagword = m.group(1)
                        #console.write("assn called: 0:'{}' 1:'{}'\n".format(m.group(0), m.group(1)))

                    editor.research(r'&lt;/?(\w+).*?&gt;', lambda m: assn(m), 0, self.wordtagpos[0], self.wordtagpos[1], 1)
                    pass
                break

            # if not found yet, go back a character and loop
            searchpos += (2*direction-1)    # so direction==0 will subtract 1, direction==1 will add 1

        #console.write("SelectCurrentTag: {:d}..{:d}..\n".format(foundstartpos, self.oldPos))

        return self.tagword, self.tagtype

    def selectFromThisOpen(self):
        """selects from the beginning of the current-position-open tag to the first close tag found"""
        # TODO: require balanced tags inside
        self.startNewSelection = self.wordtagpos[0]

        def cb(m):
            #console.write("-&gt;selectFromThisOpen: 0:'{}' at ({}..{})\n".format(m.group(0), m.start(), m.end()))
            self.endNewSelection = m.end()

        editor.research(r'&lt;/{}.*?&gt;'.format(self.tagword), cb, 0, self.wordtagpos[0], editor.getLength(), 1) # find the first

        #console.write("-&gt;selectFromThisOpen =&gt; {} .. {}\n".format(self.startNewSelection, self.endNewSelection))
        editor.setSelection(self.startNewSelection, self.endNewSelection)

    def selectToThisClose(self):
        """selects from the last open-tag found to the close tag known at the current location"""
        self.endNewSelection = self.wordtagpos[1]

        self.startNewSelection = 0  # TODO: actually find the previous open tag (or eventually, matching open tag)
        def cb(m):
            #console.write("-&gt;selectToThisClose: 0:'{}' at ({}..{})\n".format(m.group(0), m.start(), m.end()))
            self.startNewSelection = m.start()

        editor.research(r'&lt;{}.*?&gt;'.format(self.tagword), cb, 0, 0, self.wordtagpos[1]) # find the last, so don't put a maxCount parameter

        #console.write("-&gt;selectToThisClose =&gt; {} .. {}\n".format(self.startNewSelection, self.endNewSelection))
        editor.setSelection(self.startNewSelection, self.endNewSelection)

    def go(self):
        self.getTagWord()
        #console.write("SelectCurrentTag: tagword='{:s}' tagtype={:s} oldPos={:d} wordtagpos={}\n".format(self.tagword, self.tagtype, self.oldPos, self.wordtagpos))
        if self.tagtype == self.TAGTYPE.OPEN:
            self.selectFromThisOpen()
            pass
        elif self.tagtype == self.TAGTYPE.CLOSE:
            self.selectToThisClose()
            pass
        else:   # no matching tag found, so don't select anything new
            editor.setSelection( self.oldPos, self.oldPos )
            pass

SelectCurrentTag().go()
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/76704</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76704</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Mon, 09 May 2022 17:43:21 GMT</pubDate></item><item><title><![CDATA[Reply to Copy entire code group? on Mon, 09 May 2022 17:44:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/arel3" aria-label="Profile: arel3">@<bdi>arel3</bdi></a> ,</p>
<blockquote>
<p dir="auto">Is there a faster way to do it than the 4-step way I figured out and shared?</p>
</blockquote>
<p dir="auto"><s>Guy’s method is faster than what you described.</s> <em>(edit: oh, except that it’s limited to a single hardcoded tag type, whereas your problem statement could be interpreted as “any random tag I click on”)</em></p>
<p dir="auto">Notepad++ has a built-in <strong>Search &gt; Select All Between Matching Braces</strong>, which will select everything from <code>(</code> to <code>)</code> or <code>{</code> to <code>}</code>.  But it does not have a built in equivalent <strong>Select All Between Matching Tags</strong> – which is mildly surprising, since the logic is basically identical.</p>
<p dir="auto">Such a feature <em>might</em> already exist in one of the HTML or XML plugins, because there are some of those that add some pretty cool features for people who are regularly editing markup-language files (I am not included in that set, so I don’t know the features and pluses/minuses of those plugins).</p>
<p dir="auto">If it’s not there, one could write a script for the PythonScript plugin that did that… I might have a think about that implementation, if I find the time today.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/76703</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76703</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Mon, 09 May 2022 17:44:16 GMT</pubDate></item><item><title><![CDATA[Reply to Copy entire code group? on Mon, 09 May 2022 14:49:15 GMT]]></title><description><![CDATA[<p dir="auto">Thank you very much for the reply, <a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a>!</p>
<p dir="auto">Is there a faster way to do it than the 4-step way I figured out and shared?</p>
<p dir="auto">Something like holding a key and clicking on a <code>&lt;tag&gt;</code>?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/76701</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76701</guid><dc:creator><![CDATA[arel3]]></dc:creator><pubDate>Mon, 09 May 2022 14:49:15 GMT</pubDate></item><item><title><![CDATA[Reply to Copy entire code group? on Sun, 08 May 2022 22:00:07 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/arel3" aria-label="Profile: arel3">@<bdi>arel3</bdi></a> and<strong>All</strong>,</p>
<p dir="auto">One <strong>easy</strong> possibility is to grab <strong>all</strong> the text with a <strong>regular expression</strong> !</p>
<p dir="auto">For instance, in order to select all the text <strong><code>&lt;table&gt;tons of code&lt;/table&gt;</code></strong></p>
<ul>
<li>
<p dir="auto">Open the <strong><code>Mark dialog</code></strong></p>
</li>
<li>
<p dir="auto">SEARCH <strong><code>(?s-i)^\h*&lt;table&gt;.+?&lt;/table&gt;</code></strong></p>
</li>
<li>
<p dir="auto"><strong>Untick</strong> all options</p>
</li>
<li>
<p dir="auto">Tick the <strong><code>Purge for each search</code></strong> and <strong><code>Wrap around</code></strong> options</p>
</li>
<li>
<p dir="auto">Select the <strong><code>Regular expression</code></strong> search <strong>mode</strong></p>
</li>
<li>
<p dir="auto">Click on the <strong><code>Mark All</code></strong> button</p>
</li>
<li>
<p dir="auto">Click on the <strong><code>Copy Marked text</code></strong> button</p>
</li>
<li>
<p dir="auto">Open a <strong>new</strong> tab and <strong>Paste</strong> the clipboard contents</p>
</li>
</ul>
<p dir="auto">=&gt; You should get <strong>all</strong> text between the <strong><code>&lt;table&gt;</code></strong> and <strong><code>&lt;/table&gt;</code></strong> tags, including the <strong>tags</strong> themselves</p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/76691</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76691</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Sun, 08 May 2022 22:00:07 GMT</pubDate></item></channel></rss>