Community
    • Login

    Bookmark Scrollbar display

    Scheduled Pinned Locked Moved General Discussion
    bookmark
    13 Posts 6 Posters 6.0k 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.
    • Claudia FrankC
      Claudia Frank @Justin Price
      last edited by

      @Justin-Price

      as you said

      Either on the line numbers or on the scrollbar?

      and because line numbers would change while scrolling,
      it makes me think you have unchecked

      Settings->Preferences->Editing->Display Bookmarks

      Could this be?

      Cheers
      Claudia

      1 Reply Last reply Reply Quote 1
      • Justin PriceJ
        Justin Price
        last edited by

        @Claudia-Frank you are correct it makes more sense on the scrollbar than the line numbers. I do not have that setting turned off. The scrollbar shows you the whole document so it would make more sense to show them in the scrollbar like my screen shot above from Visual Studio.

        When you have multiple bookmarks on the document it would be really nice to be able to see where you are at in relation to the bookmarks on the document. This is what Visual studio allows you to see. (am i above or below my bookmark.) I know you can do that with line numbers but when you have multiple its just hard to keep track.

        1 Reply Last reply Reply Quote 1
        • Ilya NenashevI
          Ilya Nenashev
          last edited by

          I see https://notepad-plus-plus.org/community/topic/13401/feature-request-smart-scrollbar request for this feature, but there is a strange comment and that topic is inexplicably locked.

          I feel sad because of lack of marks over scrollbar for bookmarks, search results and smart highlights.

          I extremely like this feature in Chrome (for find in a page), in Delphi with installed cnPack, in Visual Studio, and it’s my vital need to have this in Notepad++!

          1 Reply Last reply Reply Quote 0
          • SalviaSageS
            SalviaSage
            last edited by

            @Scott-Sumner

            I assume you will not be sharing the script which shows us how many bookmarks we have on our documents?

            Scott SumnerS 1 Reply Last reply Reply Quote 0
            • Ilya NenashevI
              Ilya Nenashev
              last edited by

              Similar request for document map panel: https://notepad-plus-plus.org/community/topic/14477/feature-requeset-show-highlighted-variables-in-document-map

              But Document map did not represent the whole document, in contradistinction to a scrollbar. And I did not find a way to zoom off it.

              1 Reply Last reply Reply Quote 0
              • Scott SumnerS
                Scott Sumner @SalviaSage
                last edited by

                @SalviaSage said:

                I assume you will not be sharing the script which shows us how many bookmarks we have on our documents?

                Correct. It uses one of the sections of the status bar that you complained about previously regarding excessive flickering. I don’t wanna go through that again. :-D

                1 Reply Last reply Reply Quote 0
                • SalviaSageS
                  SalviaSage
                  last edited by

                  Yeah but, I have already learned how to put things into the 6 different locations in the statusbar, I am planning to put it next to my file name - date last modified area, the first category.

                  Give me the code?

                  pretty please? with a cherry on top ???

                  ^__^

                  Scott SumnerS 1 Reply Last reply Reply Quote 0
                  • Scott SumnerS
                    Scott Sumner @SalviaSage
                    last edited by

                    @SalviaSage

                    …cherry on top

                    Haha…well, here’s something to get you going with bookmarks:

                    NPP_BOOKMARK_MARKER_ID_NUMBER = 24  # from N++ source code: MARK_BOOKMARK = 24;
                    NPP_BOOKMARK_MARKER_MASK = 1 << NPP_BOOKMARK_MARKER_ID_NUMBER
                    
                    line_nbr = editor.markerNext(0, NPP_BOOKMARK_MARKER_MASK)
                    found_at_least_1 = False
                    while line_nbr != -1:
                        print 'bookmark found at line', str(line_nbr + 1)
                        found_at_least_1 = True
                        line_nbr = editor.markerNext(line_nbr + 1, NPP_BOOKMARK_MARKER_MASK)
                    if not found_at_least_1:
                        print 'no bookmarks found'
                        if 0:
                            print 'adding one at current line'
                            editor.markerAdd(editor.lineFromPosition(editor.getCurrentPos()), NPP_BOOKMARK_MARKER_ID_NUMBER)
                    

                    The code if the if 0: block isn’t enabled but it illustrates how to add a bookmark with PS code if you ever want to do that. Otherwise the code simply prints out what lines it finds previously set bookmarks at.

                    1 Reply Last reply Reply Quote 0
                    • SalviaSageS
                      SalviaSage
                      last edited by SalviaSage

                      Thanks for posting that code, I seriously need to learn the Scintilla API so I can make my own plugins and scripts. but I am pre-occupied by another scientific subject, so it’s been put on hold… : P

                      1 Reply Last reply Reply Quote 1
                      • Alan KilbornA
                        Alan Kilborn
                        last edited by

                        The marker ID used for bookmarks changed in Notepad++ 8.4.6 (and later). It is now 20, instead of 24. So, all references to 24 in this thread and/or its script(s), should be changed to 20.

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