• Login
Community
  • Login

How to bookmark group of selected line

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
14 Posts 2 Posters 682 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.
  • S
    Shekhar Singh
    last edited by PeterJones Jan 19, 2023, 1:54 PM Jan 18, 2023, 7:34 PM

    how to bookmark group of selected line
    if i select more than one line , than i can only bookmark one usimg cntrol f2 function

    A 1 Reply Last reply Jan 18, 2023, 7:37 PM Reply Quote 0
    • A
      Alan Kilborn @Shekhar Singh
      last edited by Jan 18, 2023, 7:37 PM

      @Shekhar-Singh

      Open the Mark dialog (press Ctrl+m).

      Find what: (?-s).*
      Bookmark line: checked
      In selection: checked
      Search mode: Regular expression

      Press: Mark All

      A 1 Reply Last reply Jan 19, 2023, 12:18 PM Reply Quote 1
      • S
        Shekhar Singh
        last edited by Jan 18, 2023, 7:40 PM

        hi , thanks for replying. I wanted do same with a a simple hot key.

        A 1 Reply Last reply Jan 18, 2023, 7:41 PM Reply Quote 0
        • A
          Alan Kilborn @Shekhar Singh
          last edited by Jan 18, 2023, 7:41 PM

          @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
          • A
            Alan Kilborn @Alan Kilborn
            last edited by Alan Kilborn Jan 19, 2023, 2:53 PM Jan 19, 2023, 12:18 PM

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

            S 1 Reply Last reply Jan 22, 2023, 12:43 PM Reply Quote 3
            • S
              Shekhar Singh @Alan Kilborn
              last edited by Shekhar Singh Jan 22, 2023, 12:46 PM Jan 22, 2023, 12:43 PM

              @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

              A 2 Replies Last reply Jan 22, 2023, 12:46 PM Reply Quote 0
              • A
                Alan Kilborn @Shekhar Singh
                last edited by Jan 22, 2023, 12:46 PM

                @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
                • A
                  Alan Kilborn @Shekhar Singh
                  last edited by Jan 22, 2023, 12:48 PM

                  @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
                  S 1 Reply Last reply Jan 22, 2023, 12:53 PM Reply Quote 1
                  • S
                    Shekhar Singh @Alan Kilborn
                    last edited by Shekhar Singh Jan 22, 2023, 12:56 PM Jan 22, 2023, 12:53 PM

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

                    A 1 Reply Last reply Jan 22, 2023, 1:03 PM Reply Quote 0
                    • A
                      Alan Kilborn @Shekhar Singh
                      last edited by Alan Kilborn Jan 22, 2023, 1:17 PM Jan 22, 2023, 1:03 PM

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

                      S 2 Replies Last reply Jan 22, 2023, 1:11 PM Reply Quote 0
                      • S
                        Shekhar Singh @Alan Kilborn
                        last edited by Jan 22, 2023, 1:11 PM

                        @Alan-Kilborn what does oggle bookmark mean .

                        A 1 Reply Last reply Jan 22, 2023, 1:13 PM Reply Quote 0
                        • A
                          Alan Kilborn @Shekhar Singh
                          last edited by Jan 22, 2023, 1:13 PM

                          @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
                          • S
                            Shekhar Singh @Alan Kilborn
                            last edited by Jan 22, 2023, 1:14 PM

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

                            A 1 Reply Last reply Jan 22, 2023, 1:21 PM Reply Quote 0
                            • A
                              Alan Kilborn @Shekhar Singh
                              last edited by Alan Kilborn Jan 22, 2023, 1:27 PM Jan 22, 2023, 1:21 PM

                              @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
                              10 out of 14
                              • First post
                                10/14
                                Last post
                              The Community of users of the Notepad++ text editor.
                              Powered by NodeBB | Contributors