Community
    • Login

    All bookmarks list view

    Scheduled Pinned Locked Moved General Discussion
    20 Posts 6 Posters 5.6k 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.
    • EkopalypseE
      Ekopalypse @Alan Kilborn
      last edited by

      Isn’t the requirement completely covered by the bookmark feature that is already available? Or what am I missing? Even if the point is to have a direct jump, I would argue that depending on where you are in the code, it takes at most three steps to get to where you want to be.

      @alan-kilborn
      Assuming the point is to edit text at the destination marks, the “bookmark list view” can quickly become invalid. So something like an update location mechanism would be needed, or am I misunderstanding the point of the script?

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

        @ekopalypse said in All bookmarks list view:

        am I misunderstanding the point of the script?

        I think maybe you are. The script is just a simple demo of how a real bookmarks “manager” could work, and at that, just the basics. (I don’t know that I like the word “manager” but having trouble with a good name.)

        The point of the discussion and the demo is just to solicit comments, rather than simply describing something with words in an issue.

        I do like the “style” of the output in the demo (if I do say so, myself) which works very similarly to the Search result window, so it is something users would already be very comfortable with.

        @ekopalypse said in All bookmarks list view:

        Isn’t the requirement completely covered by the bookmark feature that is already available?

        Hardly. Bookmarks are great if I set one or two. Beyond that, without some kind of “manager” I quickly lose “context” of where I’ve set them. The plugin I mentioned before provides some of this context, but only at a per-file level.

        @ekopalypse said in All bookmarks list view:

        if the point is to have a direct jump

        That’s one point. Another point, which I might argue is equally important, is where the bookmarks currently are. Without this, all I know is that I have some quantity of bookmarks, set somewhere.

        @ekopalypse said in All bookmarks list view:

        it takes at most three steps to get to where you want to be.

        Hmm. Currently if I have 10 bookmarks set in a single file, and my caret is somewhere between the 6th and 7th bookmarks, and I want to go to the 2nd bookmark (presuming I can remember what logical line that is set at – to know I want that one), how many steps does that take?

        @ekopalypse said in All bookmarks list view:

        Assuming the point is to edit text at the destination marks, the “bookmark list view” can quickly become invalid. So something like an update location mechanism would be needed

        Even with the demo, it could be used in an “invoke” -> “jump” (which autocloses the original results) -> “edit” -> “(re)invoke” -> etc. cycle, where the reinvoke freshens any changed locations in the output.

        But again, just a demo, a real version could certainly remain open at all times and be freshened automatically.

        Your comments make me feel as if I’m really missing the (book)mark on this, if you’ll excuse the pun. :-(

        EkopalypseE 1 Reply Last reply Reply Quote 1
        • EkopalypseE
          Ekopalypse @Alan Kilborn
          last edited by Ekopalypse

          @alan-kilborn

          Sorry, I did not express myself clearly. The first part of my comment should refer to your mentioned feature request. There it asks for a goto extension for 5 or 5 additional goto locations. I don’t see the added value there compared to the bookmarks.

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

            @ekopalypse said in All bookmarks list view:

            it asks for a goto extension for 5 or 5 additional goto locations. I don’t see the added value there compared to the bookmarks.

            I see. I think maybe the originator of that request doesn’t even know about the bookmarking feature.

            But the request really made me start thinking about bookmarks and the fact that I don’t use them much, mainly because I can’t mentally keep track of them. But why should I have to mentally keep track of them when I have a computer to do it.

            Michael VincentM PeterJonesP 2 Replies Last reply Reply Quote 3
            • Michael VincentM
              Michael Vincent @Alan Kilborn
              last edited by

              @alan-kilborn said in All bookmarks list view:

              But why should I have to mentally keep track of them when I have a computer to do it.

              Agree. I whipped up an NppExec script to list bookmarks as well and provide the double-click/goto feature from the NppExec console. I still don’t use Bookmarks all that often though.

              Cheers.

              1 Reply Last reply Reply Quote 2
              • PeterJonesP
                PeterJones @Alan Kilborn
                last edited by PeterJones

                @Alan-Kilborn,

                I don’t use them much, mainly because I can’t mentally keep track of them.

                @Michael-Vincent,

                I still don’t use Bookmarks all that often

                The only times I use Bookmarks are for the temporary search-and-select benefits that the Search > Bookmark menu gives you. I do not remember leaving multiple bookmarks active beyond my memory’s ability to track them. About the only thing that a “long-term” bookmark would help me with is getting back to the particular function I was editing: since I said the word “function”, it’s obviously easier to get there with the Function List panel for me. I just don’t have enough non-code text files that are big enough to benefit from bookmarks… and when I do, I usually make a UDL+FunctionList for them anyway, so they are effectively code with some pattern that gets me to the right ballpark. I cannot think of any truly random, non-patterened places that I would ever have a need to mark.

                But I know that my Notepad++ usage model is different from many (as has been evidenced time and again in this Community), and I do agree that if someone did have a need for more than one or two long-term bookmarks, having a Manager for that would likely be helpful. I somehow doubt that TPTB would find much use in that, so it will probably be relegated to Plugin land. At which point, I would probably hit up Bookmarks@Dook to see if Dook was willing to add a way to track/show all tabs’ bookmarks in one view. Oh, issue #11 starts with “all bookmarks of all opened files” request, and that was more than six months ago – and Dook rejected the multi-tab portion of that request because “NPP does not provide API to retrieve information from open tabs withouts switching to them”. (Unfortunately, that plugin hides the source code; otherwise, someone could learn from the way it was implemented, or suggest a PR to the author.)

                I am tempted to suggest a workaround to Dook. I probably will, actually. (Addendum: added my comment there)

                Alan KilbornA 2 Replies Last reply Reply Quote 1
                • Alan KilbornA
                  Alan Kilborn @PeterJones
                  last edited by

                  @peterjones said in All bookmarks list view:

                  Dook

                  To me, “Dook” doesn’t seem like much of a “team player”. Not posting your source code for such an item is in bad taste. Personally, I’d not count on Dook for anything.

                  @peterjones said in All bookmarks list view:

                  I am tempted to suggest a workaround to Dook. I probably will, actually.

                  Curious as to what this might be.

                  PeterJonesP 1 Reply Last reply Reply Quote 0
                  • Alan KilbornA
                    Alan Kilborn @PeterJones
                    last edited by

                    @peterjones said in All bookmarks list view:

                    I do not remember leaving multiple bookmarks active beyond my memory’s ability to track them

                    This is my “problem” too, as I said.

                    But, I wonder if I might feel differently and use this feature more if it had a nice “manager”. I guess I won’t get this answered until there IS a real manager. :-)

                    PeterJonesP 1 Reply Last reply Reply Quote 0
                    • PeterJonesP
                      PeterJones @Alan Kilborn
                      last edited by

                      @alan-kilborn ,

                      Curious as to what this might be.

                      I don’t know that it’s all that brilliant: but since bookmarks don’t change except when a given tab is active anyway, just do a single scan of all files during plugin initialization, and then have the plugin behave normally for tracking the changes on the active tab’s bookmarks. But maybe I’m missing something obvious why that wouldn’t work.

                      1 Reply Last reply Reply Quote 1
                      • PeterJonesP
                        PeterJones @Alan Kilborn
                        last edited by PeterJones

                        @alan-kilborn said in All bookmarks list view:

                        @peterjones said in All bookmarks list view:

                        I do not remember leaving multiple bookmarks active beyond my memory’s ability to track them

                        This is my “problem” too, as I said.

                        I think I phrased that poorly. My “I do not remember” portion meant more, “I cannot now think of a time when I left multiple bookmarks active beyond my memory’s ability to track them”. Or said another way, “I’ve never run into the situation where I needed to manage a bookmark long-term”

                        1 Reply Last reply Reply Quote 0
                        • darkworksD
                          darkworks @Alan Kilborn
                          last edited by

                          @alan-kilborn well these bookmarks are saved collectively of all notes. i think its not good approach to save them collectively. because in situation like me where you have 70+ notes open in notepad++ and if am currently working in note # 3 and this bookmark file will open with a lot of other bookmarks and you have to switch between bookmark tab and your note tab back and forth. this approach is good for normal users but not for developers. if jump points for single note is maintain within its CTRL + G modal then will be good and when note is close it should be destroyed with it.

                          1 Reply Last reply Reply Quote 0
                          • Andi KiisselA
                            Andi Kiissel @Alan Kilborn
                            last edited by

                            @alan-kilborn
                            For me this is very useful script. Thank you!
                            But I’m very beginner in Python and can’t think out how to add a possibility to “Go back to previous location”? In case I decide not to go to any bookmark, or if I see that I haven’t set bookmark to right place.
                            I would be very thankful if you find time to help with this.

                            Alan KilbornA 1 Reply Last reply Reply Quote 0
                            • Alan KilbornA
                              Alan Kilborn @Andi Kiissel
                              last edited by

                              @andi-kiissel said in All bookmarks list view:

                              “Go back to previous location”? In case I decide not to go to any bookmark

                              For this case you would simply close the the “new X” (X is a digit) tab; you should be returned to the point where you were editing when you invoked the script.

                              But it maybe feels like I’m misunderstanding something…?

                              Andi KiisselA 1 Reply Last reply Reply Quote 0
                              • Andi KiisselA
                                Andi Kiissel @Alan Kilborn
                                last edited by

                                @alan-kilborn
                                Perhaps I have missed or misunderstod some setting?
                                By default new tab opens as last rightmost tab. If I close it, then activates new last rightmost tab. If I have 10 tabs and run script from 3rd tab, then after closing this 11th tab I will be in 10th tab, not in 3rd.

                                Alan KilbornA 1 Reply Last reply Reply Quote 0
                                • Alan KilbornA
                                  Alan Kilborn @Andi Kiissel
                                  last edited by

                                  @andi-kiissel said in All bookmarks list view:

                                  By default new tab opens as last rightmost tab. If I close it, then activates new last rightmost tab

                                  Ah, you must have changed this setting away from the default; default shown here:

                                  e9a95d5f-872b-4196-8c90-4cb4af5567f2-image.png

                                  I find that if I create a new file, do something to it, then close it, it makes the most sense to then be left editing the file I “most-recently-used”, instead of whatever happens to be the right-most existing tab.

                                  The script is meant to be a simple demo, but if you do not want to tick the option I show (for some reason), I could see what I can do about “fixing” the script.

                                  Andi KiisselA 1 Reply Last reply Reply Quote 1
                                  • Andi KiisselA
                                    Andi Kiissel @Alan Kilborn
                                    last edited by

                                    @alan-kilborn
                                    I’m sorry! I don’t like this Document Switcher.
                                    But now I think I found a bug: without Enable Document Switcher
                                    sometimes Enable MRU is greyed out:
                                    33ef063f-8af3-41f7-b17a-68d23bcdb29a-image.png
                                    and sometimes not:
                                    53133f7d-198a-4c35-b30f-9bb517ca148c-image.png
                                    If I enable MRU then yes, last edited tab will be activated.

                                    Alan KilbornA 1 Reply Last reply Reply Quote 0
                                    • Alan KilbornA
                                      Alan Kilborn @Andi Kiissel
                                      last edited by

                                      @andi-kiissel said in All bookmarks list view:

                                      I don’t like this Document Switcher.

                                      I’m not sure what you mean by this.
                                      If you don’t like the Ctrl+Tab feature, don’t use it.

                                      now I think I found a bug

                                      If you can provide some steps to reproduce, an actual bug report can be created.

                                      Andi KiisselA 1 Reply Last reply Reply Quote 0
                                      • Andi KiisselA
                                        Andi Kiissel @Alan Kilborn
                                        last edited by

                                        @alan-kilborn said in All bookmarks list view:

                                        If you don’t like the Ctrl+Tab feature, don’t use it.

                                        I do like Ctrl+Tab feature, but don’t like table like this:
                                        a8c880c9-a01a-4151-937b-0be79ec56586-image.png
                                        Ctrl+Tab feature works fine without Document Switcher been enabled!

                                        If you can provide some steps to reproduce, an actual bug report can be created.

                                        Well, starting position:
                                        7478ba47-57a1-494e-9e90-f10525155818-image.png
                                        Switch off first “Enable”, “Enable MRU…” switches off too and stays grey:
                                        53f0b74a-3678-4a89-bba4-ee65ce35ee74-image.png
                                        Restart N++, both are available:
                                        fe9536ca-52be-4c76-9f26-6f8305ebabf3-image.png

                                        And I can switch “Enable MRU…” on alone:
                                        a5ec43d9-f20f-41ca-ad7e-19aea5abd687-image.png
                                        I’m not sure that I can describe this good enough for official bug report. And perhaps there is some logic.

                                        Anyway, now I got things work how I like.
                                        Thank you!

                                        1 Reply Last reply Reply Quote 3
                                        • 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 4
                                          • First post
                                            Last post
                                          The Community of users of the Notepad++ text editor.
                                          Powered by NodeBB | Contributors