Community
    • Login

    How to bookmark group of selected line

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    14 Posts 2 Posters 657 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.
    • Alan KilbornA
      Alan Kilborn @Shekhar Singh
      last edited by

      @Shekhar-Singh said in ow to bookmark group of selected line:

      I wanted do same with a a simple hot key.

      So make a macro out of the operation I described.


      Is there a lot of usefulness in bookmarking a series of lines in this manner?

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

        @Alan-Kilborn said in ow to bookmark group of selected line:

        (?-s).*

        Actually, (?-s).* won’t bookmark any empty lines in the selected region.

        Try an even simpler \R as the Find what expression.

        This has the added bonus of NOT redmarking anything.

        (I still don’t see a great reason for bookmarking a consecutive number of lines… Hmm, maybe if there’s going to be a sort and all of the marked lines would move to vastly different locations. I wish the OP would chime in an give a really good rationale for this)

        Shekhar SinghS 1 Reply Last reply Reply Quote 3
        • Shekhar SinghS
          Shekhar Singh @Alan Kilborn
          last edited by Shekhar Singh

          @Alan-Kilborn yes, there is usefulness to make a to-do list or keeping track of things, but i didnt understand how to make macro from that

          Alan KilbornA 2 Replies Last reply Reply Quote 0
          • Alan KilbornA
            Alan Kilborn @Shekhar Singh
            last edited by

            @Shekhar-Singh said in How to bookmark group of selected line:

            yes, there is usefulness to make a to-do list or keeping track of things

            I’d hoped for a better explanation than that… :-(

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

              @Shekhar-Singh said in How to bookmark group of selected line:

              i didnt understand how to make macro from that

              • set up the operation in the Mark window
              • start macro recording
              • press the Mark All button
              • end macro recording
              • save and name macro
              Shekhar SinghS 1 Reply Last reply Reply Quote 1
              • Shekhar SinghS
                Shekhar Singh @Alan Kilborn
                last edited by Shekhar Singh

                @Alan-Kilborn one more thing , i wish it could work without selection as well for bookmarking a single line . like cntrl + f2 wrks , if possible. thanks for replying.

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

                  @Shekhar-Singh said in How to bookmark group of selected line:

                  one more thing , i wish it could work without selection as well for bookmarking a single line . like cntrl + f2 wrks

                  So just add Toggle Bookmark to the macro?
                  (When running with selection, don’t select the last intended line fully.)

                  Shekhar SinghS 2 Replies Last reply Reply Quote 0
                  • Shekhar SinghS
                    Shekhar Singh @Alan Kilborn
                    last edited by

                    @Alan-Kilborn what does oggle bookmark mean .

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

                      @Shekhar-Singh said:

                      what does oggle bookmark mean

                      Please try to do basic proofreading on the posts you are composing before hitting Submit.

                      1 Reply Last reply Reply Quote 0
                      • Shekhar SinghS
                        Shekhar Singh @Alan Kilborn
                        last edited by

                        @Alan-Kilborn adding toggle bookmark mean ?
                        you saying to select half line ?

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

                          @Shekhar-Singh

                          • set up the operation in the Mark window:
                            Find what: \R
                            Bookmark line: checked
                            In selection: checked
                            Search mode: Regular expression
                          • start macro recording
                          • press the Mark All button
                          • press Ctrl+F2 (which is Toggle Bookmark)
                          • end macro recording
                          • save and name macro

                          With selection:

                          6dff4655-1931-40ee-a72d-f7a7c6efcd73-image.png

                          Run macro to get:

                          5cd7d54c-2efb-4bbf-a911-94496bcabb26-image.png


                          Without selection:

                          21fcb4e0-929e-486b-a9bc-c15af1c71cd6-image.png

                          Run macro to get:

                          a0954f8b-9190-429a-a87e-edf127f2caea-image.png

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