<?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[Is there a way to customize the status bar to display more helpful information?]]></title><description><![CDATA[<p dir="auto">when I select a text, I want to see the count of instances of this text to appear in the status bar,  currently it just shows the number of selected characters and number of selected lines. Please point me to the resource which can help me customize the status bar.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/14144/is-there-a-way-to-customize-the-status-bar-to-display-more-helpful-information</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Jul 2026 02:12:07 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/14144.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 14 Jul 2017 06:45:37 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Is there a way to customize the status bar to display more helpful information? on Sun, 16 Jul 2017 21:20:25 GMT]]></title><description><![CDATA[<p dir="auto"><strong>Minor edit to the above:</strong></p>
<p dir="auto">Here’s <code>SelectedTextOccurrenceCountInStatusBar.py</code>:</p>
<p dir="auto"><strong>should have been:</strong></p>
<p dir="auto">Here’s <code>StatusBarReportingOfSelectionMatchCount.py</code>:</p>
]]></description><link>https://community.notepad-plus-plus.org/post/25648</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/25648</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Sun, 16 Jul 2017 21:20:25 GMT</pubDate></item><item><title><![CDATA[Reply to Is there a way to customize the status bar to display more helpful information? on Sun, 16 Jul 2017 20:16:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/haseeb-afzal-mohammed" aria-label="Profile: Haseeb-Afzal-Mohammed">@<bdi>Haseeb-Afzal-Mohammed</bdi></a></p>
<p dir="auto">If you are willing to use the Pythonscript plug-in (currently on 32-bit Notepad++ only), here’s a script that will enact your desired behavior.  Running the script once will make it continue to work for the rest of the the Notepad++ session.</p>
<p dir="auto">Here’s <code>SelectedTextOccurrenceCountInStatusBar.py</code>:</p>
<pre><code>def SBROSMC(_):  # (S)tatus(B)ar(R)eporting(O)f(S)election(M)atch(C)ount
    if editor.getTextLength() &lt; 10000:  # &lt;---- limit functionality to files of this size or less!
        if editor.getSelections() == 1 and not editor.getSelectionEmpty():
            SBROSMC.match_count = 0
            def match_found(m): SBROSMC.match_count += 1
            def escape(s):
                chars_to_escape = r'][.^$*+?(){}\\|-'
                literal_backslash = '\\'
                search_str = '([' + chars_to_escape + '])'
                repl_str = literal_backslash * 3 + '1'
                return re.sub(search_str, repl_str, s)
            editor.research(escape(editor.getSelText()), match_found)
            notepad.setStatusBar(STATUSBARSECTION.DOCTYPE, 'Count of selection matches: {}'.format(SBROSMC.match_count))

editor.callback(SBROSMC, [SCINTILLANOTIFICATION.UPDATEUI])  # register callback
</code></pre>
<p dir="auto">and here’s what it looks like running:</p>
<p dir="auto"><img src="http://i.imgur.com/IJpuudu.png" alt="" class=" img-fluid img-markdown" /></p>
<p dir="auto">Note that due to what I mentioned before about how long this script could take to run for really large files, I limited it to file sizes of 10000 characters or less (totally arbitrary size selection, customize it at will to your situation).</p>
<p dir="auto">Also note that the light-blue highlighting in the sample screenshot is something else of my own devising and will NOT be done by the provided script.  :-D</p>
<p dir="auto">If this (or <strong>ANY</strong>) posting was useful, don’t post a “thanks”, just upvote ( click the <code>^</code> in the <code>^ 0 v</code> area on the right ).</p>
]]></description><link>https://community.notepad-plus-plus.org/post/25646</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/25646</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Sun, 16 Jul 2017 20:16:20 GMT</pubDate></item><item><title><![CDATA[Reply to Is there a way to customize the status bar to display more helpful information? on Fri, 14 Jul 2017 11:58:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/haseeb-afzal-mohammed" aria-label="Profile: Haseeb-Afzal-Mohammed">@<bdi>Haseeb-Afzal-Mohammed</bdi></a></p>
<p dir="auto">If you have the ability to program in Python (or possibly Lua?) then the answer is Yes, it is possible (via the PythonScript/LuaScript plugins).  I show an example of how it can be done here, with Pythonscript:  <a href="https://notepad-plus-plus.org/community/topic/13087/sel-in-status-bar-is-off-by-1-on-line-count/8" rel="nofollow ugc">https://notepad-plus-plus.org/community/topic/13087/sel-in-status-bar-is-off-by-1-on-line-count/8</a></p>
<p dir="auto">A “count of instances of selected text” could cause a problem in really large files, as it would involve searching the entire file fairly often, which could take a great deal of TIME.  If the files you deal with are relatively small, however, I would think this is very doable.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/25599</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/25599</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Fri, 14 Jul 2017 11:58:14 GMT</pubDate></item></channel></rss>