<?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[UserListGotoLine to goto lines of interest]]></title><description><![CDATA[<h1>UserListGotoLine</h1>
<p dir="auto">Requires at least <a href="https://github.com/bruderstein/PythonScript" rel="nofollow ugc">PythonScript</a> v2.1 or v3.0.21.<br />
Get <code>UserListGotoLine.py</code> from <a href="https://github.com/mpheath/user-list-goto-line-for-notepad-plus-plus" rel="nofollow ugc">https://github.com/mpheath/user-list-goto-line-for-notepad-plus-plus</a></p>
<p dir="auto">Searches the current buffer for lines of interest in Notepad++ and shows a user list that will goto to the line of the selected item.</p>
<p dir="auto">The initial list can have these items:</p>
<pre><code class="language-txt">any word style 0
bookmarks
change history
change history modified
change history reverted to modified
change history reverted to origin
change history saved
codes
codes extended
codes uppercase
comments
comments block
comments doc
comments docline
comments nested
comments reminder
current char style 0
current selection
current selection style 0
current word
current word style 0
folds
log
log error
log fatal
log timestamp
log warn
</code></pre>
<p dir="auto">Some items may not be shown if no selection exists, Change History is turned off, …</p>
<ul>
<li>any word style 0
<ul>
<li>List lines that match any word in the detected style number and goto selected line.</li>
</ul>
</li>
<li>bookmarks
<ul>
<li>List bookmark lines and goto selected line.</li>
</ul>
</li>
<li>change history
<ul>
<li>List all change history lines and goto selected line.</li>
</ul>
</li>
<li>change history modified
<ul>
<li>List modified change history lines and goto selected line.</li>
</ul>
</li>
<li>change history reverted to modified
<ul>
<li>List reverted to modified change history lines and goto selected line.</li>
</ul>
</li>
<li>change history reverted to origin
<ul>
<li>List reverted to origin change history lines and goto selected line.</li>
</ul>
</li>
<li>change history saved
<ul>
<li>List saved change history lines and goto selected line.</li>
</ul>
</li>
<li>codes
<ul>
<li>List matched code lines and goto selected line.</li>
</ul>
</li>
<li>codes extended
<ul>
<li>List matched code lines with an extended pattern and goto selected line.<br />
Setup for Batch, Inno, Lua and Swift.</li>
</ul>
</li>
<li>codes uppercase
<ul>
<li>List matched code lines and with an uppercase word pattern and goto selected line.<br />
Targets what is known as code constants.<br />
Example: <code>ABC_7</code> is valid in a language preset style.<br />
Setup for Au3, Bash, CoffeeScript, C#, D, GDScript, Go, Inno, Java, JavaScript, Lua, Matlab, Perl, PHP, Powershell, Python, Raku, Ruby, Rust and Swift.</li>
</ul>
</li>
<li>comments
<ul>
<li>List comment lines and goto selected line.</li>
</ul>
</li>
<li>comments block
<ul>
<li>List comment block lines and goto selected line.<br />
Setup for Au3, C, C++, C#, EScript, FreeBasic, GDScript, Go, Java, JavaScript, Lua, MSSQL, PHP, Powershell, Python, Raku, Ruby, Rust, SQL and Swift.</li>
</ul>
</li>
<li>comments doc
<ul>
<li>List comment document lines and goto selected line.<br />
Setup for C, C++, C#, COBOL, FreeBasic, Go, Java, JavaScript, Raku, Rust, SQL and Swift.</li>
</ul>
</li>
<li>comments docline
<ul>
<li>List comment single line document lines and goto selected line.<br />
Setup for D.</li>
</ul>
</li>
<li>comments nested
<ul>
<li>List comment nested document lines and goto selected line.<br />
Setup for D.</li>
</ul>
</li>
<li>comments reminder
<ul>
<li>List lines containing <code>debug:</code>, <code>reminder:</code>, <code>todo:</code> in line comments and goto selected line.<br />
Lines of code with end of line comments can be in the list.</li>
</ul>
</li>
<li>current char style 0
<ul>
<li>List lines that match current char in the detected style number and goto selected line.</li>
</ul>
</li>
<li>current selection
<ul>
<li>List lines that match selection and goto selected line.</li>
</ul>
</li>
<li>current selection style 0
<ul>
<li>List lines that match selection in the detected style number and goto selected line.<br />
Must be word characters matched by re.match <code>^\w+$</code> so can be part of a word.<br />
Added provided it has good use though could change to improve or be removed if it has issues.</li>
</ul>
</li>
<li>current word
<ul>
<li>List lines that match current word and goto selected line.</li>
</ul>
</li>
<li>current word style 0
<ul>
<li>List lines that match current word in the detected style number and goto selected line.</li>
</ul>
</li>
<li>folds
<ul>
<li>List fold lines and goto selected line.</li>
</ul>
</li>
<li>log
<ul>
<li>List lines containing <code>error</code>, <code>fatal</code> and <code>warn</code> word variants and goto selected line.<br />
Files of the type <code>.log</code> are recognized.</li>
</ul>
</li>
<li>log error
<ul>
<li>List lines containing word <code>error</code> variants and goto selected line.</li>
</ul>
</li>
<li>log fatal
<ul>
<li>List lines containing word <code>fatal</code> and goto selected line.</li>
</ul>
</li>
<li>log timestamp
<ul>
<li>List lines with timestamps and goto selected line.<br />
Language text with <code>.LOG</code> on first line which causes Notepad.exe to auto-insert timestamps.<br />
If timestamp format re pattern is unspecified in <code>__init__</code>, then the next non-empty line will be read to create a re pattern.<br />
The created re pattern will detect lines with only a timestamp, though specifying a re pattern will let the user decide the conditions.<br />
View <a href="https://community.notepad-plus-plus.org/post/87539">DotLogTimestamp.py source</a> to use <code>.LOG</code> with Notepad++ using the PythonScript plugin.</li>
</ul>
</li>
<li>log warn
<ul>
<li>List lines containing word <code>warn</code> variants and goto selected line.</li>
</ul>
</li>
</ul>
<p dir="auto">An example showing the codes list:</p>
<p dir="auto"><img src="/assets/uploads/files/1740378227878-list.png" alt="list.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">The same format is used for the other lists. The integers on the left are line numbers. The remainder is the line text.</p>
<p dir="auto">Languages setup for style detection currently:</p>
<pre><code class="language-txt">Ada
Assembly
AutoIt
AviSynth
Batch
C             (no codes)
C#
C++           (no codes)
CMake
COBOL
CoffeeScript
CSS
D             (basic codes)
Diff
EScript       (no codes)
Fortran
FreeBasic
GDScript
Go
HTML
INI file
Inno Setup
Java
JavaScript
JSON
Lua
Makefile
Matlab
MMIXAL
MSSQL
Nim
NSIS
Pascal
Perl
PHP
Powershell
Properties
Python
Raku
Registry
Resource file
Ruby
Rust
Shell
SQL
Swift
TOML
User: dBASEPlus
User: Markdown
User: NppExec
Visual Basic
XML
</code></pre>
<p dir="auto">Items like bookmarks, change history, … where style detection is not required can work for any language.</p>
<p dir="auto">Note that Notepad++ &gt;= v8.7.6 will <a href="https://github.com/notepad-plus-plus/notepad-plus-plus/blob/8042e50b1979cf958c8a2fbd46e06f819ab30fb2/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp#L234" rel="nofollow ugc">style the whole document</a> by default rather than the previous setting of style only of what is shown. Scrolling in later versions may not be needed initially to style the whole document.</p>
<p dir="auto">Searching by default is case sensitive unless overridden. So current word search for <code>WORD</code> will find <code>WORD</code> and will not find <code>word</code>.</p>
<p dir="auto">Selections other than a main stream selection are not currently handled so attempts at using other selection types may show undesirable results.</p>
<p dir="auto">Lines of text added to the list will be maximum 120 characters so long lines may look incomplete. Passing a parameter to the existing called class named <code>UserListGL()</code> like for example</p>
<pre><code>        user_list_gl = UserListGL(150)
</code></pre>
<p dir="auto">will increase the maximum to 150 characters.</p>
<p dir="auto"><a href="https://github.com/bruderstein/PythonScript" rel="nofollow ugc">PythonScript</a> plugin:</p>
<ul>
<li>v3.0.21.0 tested as OK.</li>
<li>v2.1.0.0 tested and seems OK.</li>
<li>v2.0.0.0 is not supported as it is missing some needed functions.</li>
</ul>
<p dir="auto">Get <code>UserListGotoLine.py</code> from <a href="https://github.com/mpheath/user-list-goto-line-for-notepad-plus-plus" rel="nofollow ugc">https://github.com/mpheath/user-list-goto-line-for-notepad-plus-plus</a></p>
<p dir="auto">Interest in helping with improvements may attract my attention.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/26651/userlistgotoline-to-goto-lines-of-interest</link><generator>RSS for Node</generator><lastBuildDate>Thu, 13 Aug 2026 05:57:37 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/26651.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 24 Feb 2025 06:37:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to UserListGotoLine to goto lines of interest on Tue, 04 Mar 2025 01:41:16 GMT]]></title><description><![CDATA[<p dir="auto">Added <code>marks</code> item to list lines with <code>find</code>, <code>incremental</code>, <code>smart</code>, <code>token 1</code>, <code>token 2</code>, <code>token 3</code>, <code>token 4</code> or <code>token 5</code> marks.</p>
<p dir="auto">The <code>marks</code> item and the <code>change history</code> item will open a 2nd user list so the main user list can show less items.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/100171</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/100171</guid><dc:creator><![CDATA[mpheath]]></dc:creator><pubDate>Tue, 04 Mar 2025 01:41:16 GMT</pubDate></item><item><title><![CDATA[Reply to UserListGotoLine to goto lines of interest on Wed, 26 Feb 2025 15:01:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mpheath" aria-label="Profile: mpheath">@<bdi>mpheath</bdi></a></p>
<blockquote>
<p dir="auto">editor.hideLines()</p>
</blockquote>
<p dir="auto">As has been discussed in the Community many times, the “hide lines” feature of Notepad++ has problems, so much so that I (at least) have deemed it unusable.  If you have success in using it, then good for you.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/100077</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/100077</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Wed, 26 Feb 2025 15:01:22 GMT</pubDate></item><item><title><![CDATA[Reply to UserListGotoLine to goto lines of interest on Wed, 26 Feb 2025 14:07:11 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></p>
<blockquote>
<p dir="auto">I like the idea, and I like the script as-is as a “demo”. Nice job.</p>
</blockquote>
<p dir="auto">Glad you like the idea.</p>
<p dir="auto">The “demo” is a good description of the experience for what is possible. As developing from scratch, it sometimes is unknown what will be the end result.</p>
<blockquote>
<p dir="auto">I think for real use it needs to be “subsetted” a bit.</p>
</blockquote>
<p dir="auto">The concept of loading a main script which creates new objects with each run is concerning. The hope is the garbage collector is cleaning up the global environment of unused objects each time an existing class or function is reloaded. It is surely inefficient to do this reloading.</p>
<p dir="auto">Ideally, what I did with xconfig with using the <code>lib</code> folder helps to avoid this repetitive reloading. The code could then be broken up as it is contained in the modules imported namespace. The main script then works just with the instance object. Setup of the startup script to do the import is the users script so must be cautious in interacting with it to setup.</p>
<p dir="auto">The class was setup a little more like an application rather than a library. The methods could return the searched lines rather than directly calling the user list method. Then other options instead of the user list could be used like output to console, edit pane or to the dark side of the moon.</p>
<blockquote>
<p dir="auto">The way this works for showing bookmarks is so nice that I’m wondering if it is reasonable as a standard feature in Notepad++.</p>
</blockquote>
<p dir="auto">Notepad++ could use a graphical listing of such items. Why stop at Bookmarks when Change History, … are also just as satisfying to view in a list. Though I understand that doing one can lead to the next and trying to do it all at once might be very ambitious. If a precedent exists, then perhaps a plan can be formed.</p>
<blockquote>
<p dir="auto">I’m always looking for ways to make searching easier, and this could be one of them.</p>
</blockquote>
<p dir="auto">As-is OK. As <code>lib</code>, later perhaps. It takes time to make something grand. ;)</p>
<p dir="auto">Here is an example of filtering bookmarked lines in the editor by hiding lines. It toggles. Put the caret to a line and show the lines will put the line with the caret to the top of the editor control.</p>
<pre><code># about: Filter bookmarked lines in the editor
# help: https://community.notepad-plus-plus.org/topic/23039/faq-desk-how-to-install-and-run-a-script-in-pythonscript
# src: https://community.notepad-plus-plus.org/topic/26651

from Npp import editor, notepad

def bookmarks():
    '''Show only bookmarked lines.'''

    def toggle():
        '''Toggle hide or show lines.'''

        bookmark = notepad.getBookMarkID()
        mask = 1 &lt;&lt; bookmark
        items = []
        last_line = editor.getLineCount()

        for line in range(last_line):
            if editor.markerGet(line) &amp; mask != 0:
                items.append(line)

        if not items:
            return

        if last_line not in items:
            items.append(last_line)

        pairs = []
        prev_line = 0

        for line in items:
            if prev_line &lt;= line:
                pairs.append([prev_line, line - 1])
                prev_line = line + 1

        func = editor.hideLines if toggle.hide else editor.showLines

        for items in pairs:
            editor.ensureVisible(items[0])
            func(*items)

        if func == editor.showLines:
            pos = editor.getCurrentPos()
            line = editor.lineFromPosition(pos)
            editor.setFirstVisibleLine(line)

        toggle.hide = not toggle.hide

    toggle.hide = True
    return toggle

try:
    toggle
except:
    toggle = bookmarks()

toggle()
</code></pre>
<p dir="auto">That could be adapted for current word I would presume. It is a little disruptive as bookmarked lines need to shown before hiding them else they will not be visible when in filtered view.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/100071</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/100071</guid><dc:creator><![CDATA[mpheath]]></dc:creator><pubDate>Wed, 26 Feb 2025 14:07:11 GMT</pubDate></item><item><title><![CDATA[Reply to UserListGotoLine to goto lines of interest on Wed, 26 Feb 2025 05:12:10 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mpheath" aria-label="Profile: mpheath">@<bdi>mpheath</bdi></a> ,<br />
What you found, is actually a property for an Entryfield object in dBASE Plus, that formats the text in it to look a certain way. In this case, that option converts the letters to uppercase inside of the entryfield object.</p>
<p dir="auto">Yes it’s unfortunate, but one of the shortcomings of using the General Purpose parser, is that a property named <code>function</code> will also be highlighted as the keyword <code>Function</code>.  Luckily, because of the Function List parser, it won’t be flagged as a function because it doesn’t follow the pattern for Functions in the language. :-)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/100063</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/100063</guid><dc:creator><![CDATA[Lycan Thrope]]></dc:creator><pubDate>Wed, 26 Feb 2025 05:12:10 GMT</pubDate></item><item><title><![CDATA[Reply to UserListGotoLine to goto lines of interest on Tue, 25 Feb 2025 12:36:23 GMT]]></title><description><![CDATA[<p dir="auto">I like the idea, and I like the script as-is as a “demo”.  Nice job.</p>
<p dir="auto">I think for real use it needs to be “subsetted” a bit.  For my use, I’d like it for listing out bookmarks and as a quick-search feature for the current word.  I can see myself adapting it for these two purposes, probably in two separate scripts.</p>
<p dir="auto">The way this works for showing bookmarks is so nice that I’m wondering if it is reasonable as a standard feature in Notepad++.</p>
<p dir="auto">I’m always looking for ways to make searching easier, and this could be one of them.  (I simply find opening the Find dialog and slogging through FindNext, FindNext, etc. just too annoying/distracting, so I rarely do it – I have some helper scripts that easily run file-level searches and show me <em>Search results</em>, making much less of a disturbance).</p>
]]></description><link>https://community.notepad-plus-plus.org/post/100032</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/100032</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Tue, 25 Feb 2025 12:36:23 GMT</pubDate></item><item><title><![CDATA[Reply to UserListGotoLine to goto lines of interest on Tue, 25 Feb 2025 01:34:27 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> Thanks for the praise.</p>
<p dir="auto"><code>PROSHEET.txt</code> for the <code>dBASEPlus</code> UDL posted in a <a href="https://github.com/notepad-plus-plus/notepad-plus-plus/issues/16221#issuecomment-2679956725" rel="nofollow ugc">Github comment</a> shows lines like:</p>
<pre><code>      function = "!"
</code></pre>
<p dir="auto">which looks like an attribute assignment though <code>function</code> is matched by style <code>14</code> so I updated the codes pattern to avoid listing these unwanted lines with an assertion to check ahead for the <code>=</code> character.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/100024</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/100024</guid><dc:creator><![CDATA[mpheath]]></dc:creator><pubDate>Tue, 25 Feb 2025 01:34:27 GMT</pubDate></item><item><title><![CDATA[Reply to UserListGotoLine to goto lines of interest on Mon, 24 Feb 2025 23:12:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mpheath" aria-label="Profile: mpheath">@<bdi>mpheath</bdi></a> ,<br />
This works really nice like we talked about. Thanks for this additional tool for languages.  Great tool to find lists of program code per language, even UDL’s. :-)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/100022</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/100022</guid><dc:creator><![CDATA[Lycan Thrope]]></dc:creator><pubDate>Mon, 24 Feb 2025 23:12:51 GMT</pubDate></item></channel></rss>