Community
    • Login

    Bookmarks list window

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    7 Posts 3 Posters 3.7k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • EagleXKE Offline
      EagleXK
      last edited by

      Coding in Delphi IDE I’m often using bookmarks for code navigation, it’s Ctrl+Shift+1 to Ctrl+Shift+9 to toggle bookmark and Ctrl+1 to Ctrl+9 to go to bookmark number. I know N++ works in a different manner with bookmarks and I can have much more that 9 of them just pressing Ctrl+F2 to toggle on any row. My main problem is navigation: F2 and Shift+F2 is not enough. I would like to have some window with all bookmark lines with numbers and text (at least first 100 chars) when I can double click on a bookmark and be moved there. Something like “Find results” window (Ctrl+F, Find All in Current Document). Possible someone know how to achieve that or some plugin doing that? Thanks in advance!

      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • Alan KilbornA Offline
        Alan Kilborn @EagleXK
        last edited by

        @EagleXK

        Try Bookmark Manager plugin?

        1 Reply Last reply Reply Quote 3
        • EagleXKE Offline
          EagleXK
          last edited by

          @Alan Kilborn
          Thank you, but it is not doing what I want. Yes, it allows to use bookmarks similar to Delphi IDE but it still does not list all bookmarks in a single window. Can explain why: I have huge log file with hundred thousands lines and I want to mark some important lines to see only key ones in one list and then be able to navigate to key row to analyze log deeply. Something like that :)

          Eko palypseE 1 Reply Last reply Reply Quote 1
          • Eko palypseE Offline
            Eko palypse @EagleXK
            last edited by Eko palypse

            @EagleXK

            by using pythonscript plugin and its internal console you could achieve it with a script like this

            console.clear()
            console.show()
            _filename = notepad.getCurrentFilename()
            markers = []
            bookmarker_id = 1<<24
            markerLine = editor1.markerNext(0, bookmarker_id)
            while markerLine > -1:
                markers.append(markerLine)
                markerLine = editor1.markerNext(markerLine+1, bookmarker_id)
                
            for line in markers:
                print '  File "{}", line {}     {}'.format(_filename, line, editor.getLine(line).strip()[:100])
            

            but don’t know if it is fast enough on large files as haven’t tested it.

            EagleXKE 1 Reply Last reply Reply Quote 5
            • Eko palypseE Offline
              Eko palypse
              last edited by

              Little correction:

              print '  File "{}", line {:<10} {}'.format(_filename, line+1, editor.getLine(line).strip()[:100])
              
              1 Reply Last reply Reply Quote 2
              • Eko palypseE Offline
                Eko palypse
                last edited by

                just tested with a file > 5 million lines

                File "... big.txt", line 184        test some text ...
                File "... big.txt", line 2820230    test some text ...
                File "... big.txt", line 3355083    test some text ...
                File "... big.txt", line 4724326    test some text ...
                File "... big.txt", line 5012185    test some text ...
                File "... big.txt", line 5444997    test some text ...
                

                took 0.483000040054 seconds
                Note, output edited because of spam flagged … :-(

                1 Reply Last reply Reply Quote 1
                • EagleXKE Offline
                  EagleXK @Eko palypse
                  last edited by

                  @Eko-palypse , that’s amazing! Many thanks, it works perfectly!

                  1 Reply Last reply Reply Quote 1

                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                  With your input, this post could be even better 💗

                  Register Login
                  • First post
                    Last post
                  The Community of users of the Notepad++ text editor.
                  Powered by NodeBB | Contributors