<?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[has a plugin like sublime plugin BracketHighlighter?]]></title><description><![CDATA[<p dir="auto">has a plugin like sublime plugin BracketHighlighter?<br />
high_visibility_enabled_by_default": true<br />
Screenshots:<br />
<a href="https://drive.google.com/open?id=0By5ssgBX1IWaVkxwUlhiNGdYYTA" rel="nofollow ugc">https://drive.google.com/open?id=0By5ssgBX1IWaVkxwUlhiNGdYYTA</a></p>
]]></description><link>https://community.notepad-plus-plus.org/topic/14501/has-a-plugin-like-sublime-plugin-brackethighlighter</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Apr 2026 18:46:55 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/14501.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 21 Sep 2017 14:26:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to has a plugin like sublime plugin BracketHighlighter? on Wed, 19 Sep 2018 17:58:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/374">@scott-sumner</a><br />
Added your script under <a href="https://github.com/bruderstein/PythonScript/blob/master/scripts/Samples/BracketHighlighter.py" rel="nofollow ugc">https://github.com/bruderstein/PythonScript/blob/master/scripts/Samples/BracketHighlighter.py</a>. Hope that is ok for you. If you have more example scripts to add just let me know. Would be happy to add more of them.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/34961</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/34961</guid><dc:creator><![CDATA[chcg]]></dc:creator><pubDate>Wed, 19 Sep 2018 17:58:56 GMT</pubDate></item><item><title><![CDATA[Reply to has a plugin like sublime plugin BracketHighlighter? on Sat, 17 Feb 2018 14:10:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/195">@guy038</a></p>
<ul>
<li>I didn’t add <code>&lt;</code> and <code>&gt;</code> to the delimiters because in the programming languages I use most often, they are not delimiters, they are less-than and greater-than.</li>
<li>Yes, I decided not to box in <code>[]</code>, etal, because of the triviality – it is more annoying to see the box than to not see it in this case.</li>
<li>The code was designed to consider only what is in the current viewing area, i.e., both the opening and closing delimiter need to be seen by the user.  This is mainly for performance reasons (consider a huge file with the matching delimiters at the very start and very end of the file).  If one wants to match delimiters that have longer distance between them, the native  Notepad++ brace-matching commands can be used.</li>
</ul>
]]></description><link>https://community.notepad-plus-plus.org/post/30348</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/30348</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Sat, 17 Feb 2018 14:10:16 GMT</pubDate></item><item><title><![CDATA[Reply to has a plugin like sublime plugin BracketHighlighter? on Sat, 17 Feb 2018 16:17:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/374">@scott-sumner</a> and <strong>All</strong>,</p>
<p dir="auto">Oh, <strong>Scott</strong>, I missed this <strong>nice</strong> script ! Luckily, thanks to <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/11257">@BENielsen</a> post and your reply to him, I’m, now, <strong>aware</strong> of this “<strong>old</strong>” script and was able to test it !</p>
<p dir="auto">First, I added the <strong><code>&lt;&gt;</code></strong> <strong>couple</strong> to the dictionary</p>
<p dir="auto">changing the script’s code :</p>
<pre><code class="language-py">        get_opening_char_via_closing_char_dict = {
            ')' : '(',
            ']' : '[',
            '}' : '{',
            }
</code></pre>
<p dir="auto">into</p>
<pre><code class="language-py">        get_opening_char_via_closing_char_dict = {
            ')' : '(',
            ']' : '[',
            '}' : '{',
			'&gt;' : '&lt;',
            }
</code></pre>
<p dir="auto">I personally like the <strong>second visual</strong> effect, with the <strong>light yellow</strong> highlighting ! Again, an <strong>awesome</strong> Python script of yours !</p>
<hr />
<p dir="auto">Just <strong>two</strong> things, that I noticed :</p>
<ul>
<li>
<p dir="auto">When a couple of the symbols, above, is <strong>empty</strong>, I mean, for instance, syntases as <strong><code>{}</code></strong> or <strong><code>&lt;&gt;</code></strong>, your script does <strong>not</strong> highlight these <strong>two</strong> symbols. Just anecdotal !</p>
</li>
<li>
<p dir="auto">More annoying : when <strong>one</strong> of the symbols, of a <strong>matched</strong> section, is <strong>not</strong> visible in main <strong>editor</strong> windows, the highlighting <strong>disappears</strong>, too !</p>
</li>
</ul>
<p dir="auto">Easy to test it : just write the <strong>two</strong> lines, below :</p>
<pre><code class="language-diff">(test start
test end)
</code></pre>
<p dir="auto">And add, <strong>successively</strong> some <strong>blank</strong> lines, between these <strong>two</strong> lines, untill, either, the line <strong><code>(test start</code></strong> or the line <strong><code>test end)</code></strong> becomes <strong>invisible</strong> =&gt; The yellow highlighting, then, <strong>disappears</strong> !</p>
<hr />
<p dir="auto">Now, you knows me, don’t you ? I tried to <strong>simulate</strong> your Python script with an appropriate <strong>regex</strong> ! I looked for, <strong>more</strong> than a <strong>complete</strong> day ! Pheeeeeeeew !</p>
<p dir="auto">The main difficulty was to take these <strong>four couples</strong> of symbols, into account, at the <strong>same</strong> time ! Moreover, because of possible <strong>nested</strong> sequence of characters, between two <strong>matched</strong> symbols, <strong>recursive</strong> regex syntaxes are really <strong>mandatory</strong> !</p>
<p dir="auto">So, here is, below, the regex, in <strong>fre-spacing</strong> mode, which has an <strong>analogue</strong> behaviour as your <strong>Python</strong> script :</p>
<pre><code class="language-diff">(?x)  (  [(]  (  [^](){}&lt;&gt;[]  |  (?1)  |  (?3)  |  (?5)  |  (?7)  )*  [)]  )  |  # looks for a () BLOCK, with any MATCHED block inside  OR
      (  [{]  (  [^](){}&lt;&gt;[]  |  (?1)  |  (?3)  |  (?5)  |  (?7)  )*  [}]  )  |  # looks for a {} BLOCK, with any MATCHED block inside  OR
      (  &lsqb;&lsqb;]  (  [^](){}&lt;&gt;[]  |  (?1)  |  (?3)  |  (?5)  |  (?7)  )*  [&rsqb;&rsqb;  )  |  # looks for a [] BLOCK, with any MATCHED block inside  OR
      (  [&lt;]  (  [^](){}&lt;&gt;[]  |  (?1)  |  (?3)  |  (?5)  |  (?7)  )*  [&gt;]  )     # looks for a &lt;&gt; BLOCK, with any MATCHED block inside
</code></pre>
<p dir="auto">Now :</p>
<ul>
<li>
<p dir="auto"><strong>Select</strong> this text</p>
</li>
<li>
<p dir="auto"><strong>Copy</strong> it with <strong><code>Ctrl + C</code></strong></p>
</li>
<li>
<p dir="auto">Open the <strong>Find</strong> dialog</p>
</li>
<li>
<p dir="auto"><strong>Paste</strong> it, with <strong><code>Ctrl + V</code></strong>, in the <strong>Find what:</strong> zone</p>
</li>
<li>
<p dir="auto">Select the <strong><code>Regular expression</code></strong> search mode</p>
</li>
<li>
<p dir="auto">Place the caret, at <strong>any</strong> location of your file</p>
</li>
<li>
<p dir="auto">Click on the <strong>Find Next</strong> button and enjoy !</p>
</li>
</ul>
<p dir="auto">Et voilà !</p>
<hr />
<p dir="auto"><strong>Notes</strong> :</p>
<ul>
<li>
<p dir="auto">At beginning, the <strong><code>(?x</code></strong> syntax forces the <strong>free-spacing</strong> mode, which means that any <strong>space</strong> character is <strong>not</strong> taken in account, unless you use, either, the syntaxes <strong><code>[ ]</code></strong>, <strong><code>\x20</code></strong> or a <strong>space</strong> character preceded by the <strong>escape</strong> <strong><code>\</code></strong> symbol</p>
</li>
<li>
<p dir="auto">Afterwards, you can see <strong>four analogue</strong> structures, surrounded by outer <strong>parentheses</strong>, There are <strong>alternatives</strong>, separated with the <strong><code>|</code></strong> symbol and stored as groups <strong><code>1</code></strong>, <strong><code>3</code></strong>, <strong><code>5</code></strong> and <strong><code>7</code></strong>. In <strong>each</strong> of them, you notice that it looks for :</p>
<ul>
<li>
<p dir="auto">The <strong>starting</strong> symbol of a <strong>well-matched</strong> block, between <strong>two square</strong> brackets, so <strong><code>[(]</code></strong>, <strong><code>[{]</code></strong>, <strong><code>&lsqb;&lsqb;]</code></strong> or <strong><code>[&lt;]</code></strong>, <strong>followed</strong> by, either :</p>
<ul>
<li>
<p dir="auto">Any <strong>single allowed</strong> character, different of these <strong>four couples</strong> of symbols, so the characters <strong><code>](){}&lt;&gt;[</code></strong>, inside a <strong>negative class</strong> <strong><code>[^....]</code></strong> of characters, so the regex <strong><code>[^](){}&lt;&gt;[]</code></strong></p>
</li>
<li>
<p dir="auto">Any other <strong>well-matched</strong> block ( <strong><code>(...)</code></strong>, <strong><code>{...}</code></strong>, <strong><code>[...]</code></strong> or <strong><code>&lt;...&gt;</code></strong> ) , thanks to a <strong>recursive</strong> call to <strong>one</strong> of the groups <strong><code>1</code></strong>, <strong><code>3</code></strong>, <strong><code>5</code></strong> or <strong><code>7</code></strong>, as a <strong>subroutine</strong>, so the regex <strong><code>(?1)|(?3)|(?5)|(?7)</code></strong></p>
</li>
</ul>
</li>
<li>
<p dir="auto">These <strong>two</strong> syntaxes may be present or <strong>not</strong>, as <strong>many</strong> times as necessary, in case of <strong>juxtaposed</strong> chars/blocks, with the <strong><code>*</code></strong> <strong>quantifier</strong></p>
</li>
<li>
<p dir="auto">The <strong>ending</strong> symbol of a <strong>well-matched</strong> block, between <strong>two square</strong> brackets too, so <strong><code>[)]</code></strong>, <strong><code>[}]</code></strong>, <strong><code>[&rsqb;&rsqb;</code></strong> or <strong><code>[&gt;]</code></strong></p>
</li>
</ul>
</li>
</ul>
<hr />
<p dir="auto"><strong>Remarks</strong> :</p>
<ul>
<li>The <strong>short</strong> version of this regex, without the <strong>free-spacing</strong> mode, is :</li>
</ul>
<p dir="auto"><strong><code>([(]([^](){}&lt;&gt;[]|(?1)|(?3)|(?5)|(?7))*[)])|([{]([^](){}&lt;&gt;[]|(?1)|(?3)|(?5)|(?7))*[}])|(&lsqb;&lsqb;]([^](){}&lt;&gt;[]|(?1)|(?3)|(?5)|(?7))*[&rsqb;&rsqb;)|([&lt;]([^](){}&lt;&gt;[]|(?1)|(?3)|(?5)|(?7))*[&gt;])</code></strong></p>
<ul>
<li>Note that the <strong><code>[(]</code></strong> syntax may be replaced, as well, with the <strong><code>\(</code></strong> syntax and, of course, the <strong><code>[&lt;]</code></strong> form is, simply, the regex <strong><code>&lt;</code></strong> !  In that case, the <strong>short</strong> regex form becomes :</li>
</ul>
<p dir="auto"><strong><code>(\(([^](){}&lt;&gt;[]|(?1)|(?3)|(?5)|(?7))*\))|(\{([^](){}&lt;&gt;[]|(?1)|(?3)|(?5)|(?7))*\})|(\[([^](){}&lt;&gt;[]|(?1)|(?3)|(?5)|(?7))*\])|(&lt;([^](){}&lt;&gt;[]|(?1)|(?3)|(?5)|(?7))*&gt;)</code></strong></p>
<p dir="auto">However, there’s, also, an <strong>issue</strong>, with that regex ! It <strong>wrongly</strong> selects <strong>all</strong> the file contents :</p>
<ul>
<li>
<p dir="auto">When text <strong>size</strong>, with <strong>multiple inner</strong> blocks, is over <strong>32,000</strong> characters about</p>
</li>
<li>
<p dir="auto">When text <strong>size</strong>, <strong>without</strong> any block, is over <strong>35,800</strong> characters about</p>
</li>
</ul>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
<p dir="auto"><strong>P.S.</strong> :</p>
<p dir="auto">You may <strong>test</strong> my regex with the <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/2135">@linpengcheng</a> <strong>clojure</strong> example, below, if you add the <strong><code>&lt;</code></strong> and <strong><code>&gt;</code></strong> symbols in <strong>dictionary</strong>  :</p>
<pre><code class="language-diff">(extend-type AsyncChannel  &lt;bla&lt;bla bla&gt; bla &gt;
  Channel
  (open? [ch] ( not (isClosed ch)))
  (Close [ch] (.serverClose ch 1000))
  (websocket? [ch] (.isWebsocket ch))
  (send!
    ([ch date] {abc} &lt;def&gt; (.send ch data ( not (websocket? ch))))
    ([ch data close-after-send?] (.send ch data ( boolean close-after-send?))))
    (on-receive [ch callback] (.setReceiveHandler ch callbac))
    (in-close [ch callback] (.setCloseHandler ch callback)))
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/30346</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/30346</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Sat, 17 Feb 2018 16:17:41 GMT</pubDate></item><item><title><![CDATA[Reply to has a plugin like sublime plugin BracketHighlighter? on Mon, 25 Sep 2017 11:21:55 GMT]]></title><description><![CDATA[<p dir="auto">@Scott Sumner<br />
thanks! It looks better. It is a very useful bracket tool,  if you push it to github, it’s easier for more people to search for it.<br />
parentheses are a well-known feature of the Lisp language.  :-)<br />
Clojure is a lisp on JVM.   <a href="https://clojure.org/" rel="nofollow ugc">https://clojure.org/</a><br />
hylang is clojure on python.  <a href="http://docs.hylang.org/en/stable/" rel="nofollow ugc">http://docs.hylang.org/en/stable/</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/26947</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/26947</guid><dc:creator><![CDATA[linpengcheng]]></dc:creator><pubDate>Mon, 25 Sep 2017 11:21:55 GMT</pubDate></item><item><title><![CDATA[Reply to has a plugin like sublime plugin BracketHighlighter? on Sun, 24 Sep 2017 12:08:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/2135">@linpengcheng</a></p>
<p dir="auto"><em>Clojure</em> seems to be a language with a lot of parentheses!  (I know nothing about <em>Clojure</em>)</p>
<p dir="auto">My opinion only, but I think the visual boxing effect could be made better by solid-coloring the box, perhaps in yellow:</p>
<p dir="auto"><img src="https://camo.nodebb.org/f97cbfd37f1fb437795ac55bb0b8c647c971a6a6?url=https%3A%2F%2Fi.imgur.com%2FW5O1aAw.png" alt="Imgur" class=" img-fluid img-markdown" /></p>
<p dir="auto">I did that by changing this line of the original script:</p>
<pre><code>indicatorOptionsSet(BH__dict['indic_for_box_at_caret'], INDICATORSTYLE.STRAIGHTBOX, (238,121,159), 0, 255, True, editorX)
</code></pre>
<p dir="auto">to this:</p>
<pre><code>indicatorOptionsSet(BH__dict['indic_for_box_at_caret'], INDICATORSTYLE.STRAIGHTBOX, (255, 255, 0), 100, 50, True, editorX)
</code></pre>
<p dir="auto">Some other notes I forgot to add earlier:</p>
<ul>
<li>I called the script <code>BracketHighlighter.py</code></li>
<li>a lot of the naming in the script starts with <code>BH__</code> ; that stand for “Bracket Highlighter”</li>
</ul>
]]></description><link>https://community.notepad-plus-plus.org/post/26926</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/26926</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Sun, 24 Sep 2017 12:08:26 GMT</pubDate></item><item><title><![CDATA[Reply to has a plugin like sublime plugin BracketHighlighter? on Sun, 24 Sep 2017 07:53:31 GMT]]></title><description><![CDATA[<p dir="auto">@Scott Sumner :<br />
thank you very much!  it’s  very cool!<br />
<a href="https://drive.google.com/file/d/0By5ssgBX1IWaY3NDbVh6cmRfSzg/view" rel="nofollow ugc">Screenshots of Clojure</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/26924</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/26924</guid><dc:creator><![CDATA[linpengcheng]]></dc:creator><pubDate>Sun, 24 Sep 2017 07:53:31 GMT</pubDate></item><item><title><![CDATA[Reply to has a plugin like sublime plugin BracketHighlighter? on Sat, 23 Sep 2017 04:30:56 GMT]]></title><description><![CDATA[<p dir="auto">@Scott Sumner :<br />
thank you very much!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/26910</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/26910</guid><dc:creator><![CDATA[linpengcheng]]></dc:creator><pubDate>Sat, 23 Sep 2017 04:30:56 GMT</pubDate></item><item><title><![CDATA[Reply to has a plugin like sublime plugin BracketHighlighter? on Fri, 22 Sep 2017 17:30:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/2135">@linpengcheng</a></p>
<p dir="auto">I found an old version of the Pythonscript under discussion.  It seems to work although it is almost guaranteed that YMMV.  :-D</p>
<p dir="auto">I ran it and made a short video of what it does when the caret is moved around thru a code file:  <a href="https://i.imgur.com/DUB4bSB.mp4" rel="nofollow ugc">https://i.imgur.com/DUB4bSB.mp4</a></p>
<p dir="auto">A large portion of the code is concerned with multiple views handling and/or cloned document handling.  Once that is sorted out, the box drawing is rather trivial.</p>
<p dir="auto">Enjoy!</p>
<pre><code>try:

    BH__dict

except NameError:

    BH__dict = dict()

    BH__dict['indic_for_box_at_caret'] = 10  # pick a free indicator number

    def indicatorOptionsSet(indicator_number, indicator_style, rgb_color_tup, alpha, outline_alpha, draw_under_text, which_editor=editor):
        which_editor.indicSetStyle(indicator_number, indicator_style)       # e.g. INDICATORSTYLE.ROUNDBOX
        which_editor.indicSetFore(indicator_number, rgb_color_tup)
        which_editor.indicSetAlpha(indicator_number, alpha)                 # integer
        which_editor.indicSetOutlineAlpha(indicator_number, outline_alpha)  # integer
        which_editor.indicSetUnder(indicator_number, draw_under_text)       # boolean

    for editorX in (editor1, editor2):
        indicatorOptionsSet(BH__dict['indic_for_box_at_caret'], INDICATORSTYLE.STRAIGHTBOX, (238,121,159), 0, 255, True, editorX)  # white box rimmed in "pale violet red 2"

    BH__dict['last_modificationType_for_hack'] = None

    def BH__containing_box_indices_into_string(str_containing_caret, caret_index_into_str):

        class Stack:
            def __init__(self): self.clear()
            def isEmpty(self): return self.size() == 0
            def push(self, item): self.items.append(item)
            def pop(self): return None if self.size() == 0 else self.items.pop()
            def peek(self): return None if self.size() == 0 else self.items[self.size() - 1]
            def size(self): return len(self.items)
            def clear(self): self.items = []

        retval = (None, None)  # default to no valid box

        get_opening_char_via_closing_char_dict = {
            ')' : '(',
            ']' : '[',
            '}' : '{',
            }
        get_closing_char_via_opening_char_dict = dict((v, k) for (k, v) in get_opening_char_via_closing_char_dict.items())

        closing_chars = get_opening_char_via_closing_char_dict.keys()
        opening_chars = get_opening_char_via_closing_char_dict.values()

        box_ending_index = -1
        box_starting_index = -1

        stack = Stack()

        for j in range(caret_index_into_str, len(str_containing_caret)):
            c = str_containing_caret[j]
            if c in closing_chars:
                if stack.isEmpty():
                    box_ending_index = j
                    break
                else:
                    if stack.peek() ==  get_opening_char_via_closing_char_dict[c]:
                        stack.pop()
                    else:
                        break  # unbalanced
            elif c in opening_chars:
                stack.push(c)

        if box_ending_index != -1:
            stack.clear()
            box_starting_index = -1
            for j in range(caret_index_into_str - 1, -1, -1):
                c = str_containing_caret[j]
                if c in opening_chars:
                    if stack.isEmpty():
                        box_starting_index = j
                        break
                    else:
                        if stack.peek() ==  get_closing_char_via_opening_char_dict[c]:
                            stack.pop()
                        else:
                            break  # unbalanced
                elif c in closing_chars:
                    stack.push(c)

        if box_ending_index != -1:
            if box_starting_index != -1:
                if str_containing_caret[box_ending_index] == get_closing_char_via_opening_char_dict[str_containing_caret[box_starting_index&rsqb;&rsqb;:
                    retval = (box_starting_index, box_ending_index + 1)

        return retval

    def BH__callback_sci_MODIFIED(args):
        global BH__dict
        BH__dict['last_modificationType_for_hack'] = args['modificationType']

    def BH__fileIsCloned(file_name_to_test):
        retval = False
        clone_detect_dict = {}
        file_tup_list = notepad.getFiles()
        for tup in file_tup_list:
            (filename, _, _, _) = tup
            if filename not in clone_detect_dict:
                clone_detect_dict[filename] = 0
            else:
                clone_detect_dict[filename] += 1
                if filename == file_name_to_test: break
        if file_name_to_test in clone_detect_dict:
            if clone_detect_dict[file_name_to_test] &gt;= 1: retval = True
        return retval

    def BH__fileIsClonedAndIsActiveInBothViews(file_name_to_test):
        retval = False
        if editor1 and editor2:
            # both views are in use
            if BH__fileIsCloned(file_name_to_test):
                curr_doc_index_main_view = notepad.getCurrentDocIndex(0)
                curr_doc_index_2nd_view = notepad.getCurrentDocIndex(1)
                main_view_active_doc_bool = False
                secondary_view_active_doc_bool = False
                file_tup_list = notepad.getFiles()
                for tup in file_tup_list:
                    (filename, _, index_in_view, view_number) = tup
                    if filename == file_name_to_test:
                        if view_number == 0:
                            if index_in_view == curr_doc_index_main_view:
                                main_view_active_doc_bool = True
                        elif view_number == 1:
                            if index_in_view == curr_doc_index_2nd_view:
                                secondary_view_active_doc_bool = True
                        if main_view_active_doc_bool and secondary_view_active_doc_bool:
                            retval = True
                            break
        return retval

    def BH__getViewableEditorAndRangeTupleListList(work_across_both_views):
        retval = []
        # retval looks like these examples:
        #  [ ( editor, [ (0, 1000), (2020, 3000) ] ) ]
        #  [ ( editor1, [ (0, 1000), (2020, 3000) ] ), ( editor2, [ (4000, 5000), (6020, 7000) ] ) ]
        def consolidate_range_tuple_list(range_tup_list):
            sorted_range_tup_list = sorted(range_tup_list)  # sort criteria is first element of tuple in list
            saved_2element_list = list(sorted_range_tup_list[0])
            for (start, end) in sorted_range_tup_list:
                if start &lt;= saved_2element_list[1]:
                    saved_2element_list[1] = max(saved_2element_list[1], end)
                else:
                    yield tuple(saved_2element_list)
                    saved_2element_list[0] = start
                    saved_2element_list[1] = end
            yield tuple(saved_2element_list)
        def get_onscreen_pos_tup_list(which_editor):  # which_editor is editor1 or editor2 (or maybe even just plain editor)
            # loosely based upon the N++ source for SmartHighlighter::highlightViewWithWord()
            retval_tup_list = list()
            temp_tup_list = []
            MAXLINEHIGHLIGHT = 400
            firstLine = which_editor.getFirstVisibleLine()
            currentLine = firstLine
            nbLineOnScreen = which_editor.linesOnScreen()
            nrLines = min(nbLineOnScreen, MAXLINEHIGHLIGHT) + 1
            lastLine = firstLine + nrLines
            prevDocLineChecked = -1
            break_out = False
            while currentLine &lt; lastLine:
                docLine = which_editor.docLineFromVisible(currentLine)
                if docLine != prevDocLineChecked:
                    prevDocLineChecked = docLine
                    startPos = which_editor.positionFromLine(docLine)
                    endPos = which_editor.positionFromLine(docLine + 1)
                    if endPos == -1:
                        endPos = which_editor.getTextLength() - 1
                        break_out = True
                    if endPos &gt; startPos: temp_tup_list.append((startPos, endPos))
                    if break_out: break
                currentLine += 1
            if len(temp_tup_list) &gt; 0:
                retval_tup_list = list(consolidate_range_tuple_list(temp_tup_list))
            return retval_tup_list
        both_views_open = True if editor1 and editor2 else False
        curr_file_active_in_both_views = BH__fileIsClonedAndIsActiveInBothViews(notepad.getCurrentFilename()) if both_views_open else False
        if both_views_open:
            ed1_range_tup_list = get_onscreen_pos_tup_list(editor1)
            ed2_range_tup_list = get_onscreen_pos_tup_list(editor2)
        if curr_file_active_in_both_views:
            range_tup_list = list(consolidate_range_tuple_list(ed1_range_tup_list + ed2_range_tup_list))
            retval.append((editor, range_tup_list))
        elif both_views_open and work_across_both_views:
            retval.append((editor1, ed1_range_tup_list))
            retval.append((editor2, ed2_range_tup_list))
        else:
            range_tup_list = get_onscreen_pos_tup_list(editor)
            retval.append((editor, range_tup_list))
        return retval

    def BH__callback_sci_UPDATEUI(args):

        # hack, see https://notepad-plus-plus.org/community/topic/12360/vi-simulator-how-to-highlight-a-word/27, look for "16400" in code:
        if args['updated'] == UPDATE.CONTENT and BH__dict['last_modificationType_for_hack'] == (MODIFICATIONFLAGS.CHANGEINDICATOR | MODIFICATIONFLAGS.USER): return

        for (editorX, pos_range_tuple_list) in BH__getViewableEditorAndRangeTupleListList(True):

            # clear out any existing highlighting in areas the user can currently see
            for (start_pos, end_pos) in pos_range_tuple_list:
                editorX.setIndicatorCurrent(BH__dict['indic_for_box_at_caret'])
                editorX.indicatorClearRange(start_pos, end_pos - start_pos)

            for (start_pos, end_pos) in pos_range_tuple_list:

                if start_pos &lt;= editorX.getCurrentPos() &lt;= end_pos:

                    (box_start_offset, box_end_offset) = BH__containing_box_indices_into_string(
                        editorX.getTextRange(start_pos, end_pos),
                        editorX.getCurrentPos() - start_pos
                        )

                    if box_start_offset != None:
                        size_of_box_in_chars = box_end_offset - box_start_offset
                        if size_of_box_in_chars &lt;= 2:
                            pass  # rather pointless to box in if the opening and closing delims are right next to each other
                        else:
                            editorX.setIndicatorCurrent(BH__dict['indic_for_box_at_caret'])
                            editorX.indicatorFillRange(start_pos + box_start_offset, size_of_box_in_chars)

    editor.callbackSync(BH__callback_sci_UPDATEUI, [SCINTILLANOTIFICATION.UPDATEUI])  # install callback
    editor.callbackSync(BH__callback_sci_MODIFIED, [SCINTILLANOTIFICATION.MODIFIED])  # may not need to be "Sync", but for now we'll make it that way

else:

    editor.setSelectionMode(editor.getSelectionMode())  # force manual UPDATEUI to happen
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/26901</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/26901</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Fri, 22 Sep 2017 17:30:51 GMT</pubDate></item><item><title><![CDATA[Reply to has a plugin like sublime plugin BracketHighlighter? on Fri, 22 Sep 2017 12:36:54 GMT]]></title><description><![CDATA[<p dir="auto">it  look very good!  Can you push it to github?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/26894</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/26894</guid><dc:creator><![CDATA[linpengcheng]]></dc:creator><pubDate>Fri, 22 Sep 2017 12:36:54 GMT</pubDate></item><item><title><![CDATA[Reply to has a plugin like sublime plugin BracketHighlighter? on Fri, 22 Sep 2017 12:29:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/2135">@linpengcheng</a></p>
<p dir="auto">I didn’t like the effect because the boxing appeared too “cluttered”; here’s an example:</p>
<p dir="auto"><img src="https://camo.nodebb.org/29e8accab7ec965937567c5956d7b84d98a44e24?url=https%3A%2F%2Fi.imgur.com%2FAmXaxPu.png" alt="Imgur" class=" img-fluid img-markdown" /></p>
<p dir="auto">I like the Sublime BracketHighligher way of doing it better…a single box around everything, not each individual line boxed.  I don’t really see how it could be done similarly well in Notepad++.</p>
<p dir="auto">Maybe instead of boxing just use a solid background color for where the boxing would occur, but that might not play too well with other coloring/styling that is done by Notepad++ in programming language source…although in my example Python array above it would probably look good.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/26893</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/26893</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Fri, 22 Sep 2017 12:29:59 GMT</pubDate></item><item><title><![CDATA[Reply to has a plugin like sublime plugin BracketHighlighter? on Fri, 22 Sep 2017 05:18:42 GMT]]></title><description><![CDATA[<p dir="auto">I’ve tried luascript,  doc and examples are few, not successful, probably I only use clojure language, mainly engaged in data analysis,</p>
<p dir="auto">I’m not lazy, I’m just not long for this technology, here’s My  notepad++ for Clojure<br />
<a href="https://github.com/linpengcheng/ClojureBoxNpp" rel="nofollow ugc">https://github.com/linpengcheng/ClojureBoxNpp</a></p>
<p dir="auto">If you have semi-finished products, can you give a github address, I try to improve it.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/26881</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/26881</guid><dc:creator><![CDATA[linpengcheng]]></dc:creator><pubDate>Fri, 22 Sep 2017 05:18:42 GMT</pubDate></item><item><title><![CDATA[Reply to has a plugin like sublime plugin BracketHighlighter? on Fri, 22 Sep 2017 04:38:54 GMT]]></title><description><![CDATA[<p dir="auto">I’ve tried luascript,  doc and examples are few, not successful, probably I only use clojure language, mainly engaged in data analysis, not long this aspect</p>
]]></description><link>https://community.notepad-plus-plus.org/post/26880</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/26880</guid><dc:creator><![CDATA[linpengcheng]]></dc:creator><pubDate>Fri, 22 Sep 2017 04:38:54 GMT</pubDate></item><item><title><![CDATA[Reply to has a plugin like sublime plugin BracketHighlighter? on Thu, 21 Sep 2017 14:37:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/2135">@linpengcheng</a></p>
<p dir="auto">I don’t believe so; you asked before 9 months ago:  <a href="https://notepad-plus-plus.org/community/topic/13017/feature-request-keep-the-current-bracket-block-surrounded-by-a-polygonal-box" rel="nofollow ugc">https://notepad-plus-plus.org/community/topic/13017/feature-request-keep-the-current-bracket-block-surrounded-by-a-polygonal-box</a></p>
<p dir="auto">It is possible to write that plugin yourself, or you could script it with one of the scripting plugins (Pythonscript, Luascript).  I did some experimentation with doing it with Pythonscript some time ago; it worked but I didn’t really like the effect so I threw it away.  But I did prove out that it was possible…</p>
]]></description><link>https://community.notepad-plus-plus.org/post/26861</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/26861</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Thu, 21 Sep 2017 14:37:02 GMT</pubDate></item></channel></rss>