• Login
Community
  • Login

Bookmarks list window

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
7 Posts 3 Posters 3.2k Views
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.
  • E
    EagleXK
    last edited by Jan 17, 2019, 2:10 PM

    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!

    A 1 Reply Last reply Jan 17, 2019, 2:22 PM Reply Quote 0
    • A
      Alan Kilborn @EagleXK
      last edited by Jan 17, 2019, 2:22 PM

      @EagleXK

      Try Bookmark Manager plugin?

      1 Reply Last reply Reply Quote 3
      • E
        EagleXK
        last edited by Jan 17, 2019, 2:36 PM

        @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 :)

        E 1 Reply Last reply Jan 17, 2019, 4:10 PM Reply Quote 1
        • E
          Eko palypse @EagleXK
          last edited by Eko palypse Jan 17, 2019, 4:13 PM Jan 17, 2019, 4:10 PM

          @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.

          E 1 Reply Last reply Jan 17, 2019, 4:59 PM Reply Quote 5
          • E
            Eko palypse
            last edited by Jan 17, 2019, 4:23 PM

            Little correction:

            print '  File "{}", line {:<10} {}'.format(_filename, line+1, editor.getLine(line).strip()[:100])
            
            1 Reply Last reply Reply Quote 2
            • E
              Eko palypse
              last edited by Jan 17, 2019, 4:35 PM

              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
              • E
                EagleXK @Eko palypse
                last edited by Jan 17, 2019, 4:59 PM

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

                1 Reply Last reply Reply Quote 1
                1 out of 7
                • First post
                  1/7
                  Last post
                The Community of users of the Notepad++ text editor.
                Powered by NodeBB | Contributors