• Login
Community
  • Login

Navigate between section in same file quickly using keyboard shortcuts

Scheduled Pinned Locked Moved General Discussion
8 Posts 4 Posters 271 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.
  • V
    VarunAgw
    last edited by VarunAgw Mar 11, 2025, 7:45 PM Mar 11, 2025, 7:38 PM

    I wanted section in my text file so I defined a custom function list for .txt files. It checks for “===============” text and consider it as a function.

    Now I have 25 functions in my text file. I can see them in functions list.

    I want to jump to next/previous function using keyboard shortcut. How do I do it?

    P.S. Any other solution that doesn’t involve functions is also acceptable. I just need sections that can be switched via keyboard shortcut

    A T N 3 Replies Last reply Mar 11, 2025, 7:46 PM Reply Quote 0
    • A
      Alan Kilborn @VarunAgw
      last edited by Alan Kilborn Mar 11, 2025, 11:43 PM Mar 11, 2025, 7:46 PM

      @VarunAgw

      Record a macro that searches (e.g. Find Next) for your text of interest, save it, and assign it to run via a keycombo.

      1 Reply Last reply Reply Quote 6
      • T
        Terry R @VarunAgw
        last edited by Terry R Mar 11, 2025, 7:58 PM Mar 11, 2025, 7:56 PM

        @VarunAgw said in Navigate between section in same file quickly using keyboard shortcuts:

        I want to jump to next/previous function using keyboard shortcut. How do I do it?

        My immediate thought would be that you would create a macro and save it with a keyboard shortcut.

        The macro would use the “Find all in current document” which is in the “Find” tab. The string searched for would be your special “==========” string.

        If you try it, it opens a search window (generally at the bottom of the Notepad++) screen. You can double click on any of the lines found and the actual file will adjust the lines being viewed so that the clicked on line appears, around the middle of the viewing window.

        Terry

        PS You may even want to add to the special string a title for each function so you would immediately know which search line to click on. Still use the “======” string but append it with a title, and just search on the “=====” portion. This can use “normal” as the search mode since the string doesn’t change.

        1 Reply Last reply Reply Quote 5
        • V
          VarunAgw
          last edited by Mar 12, 2025, 5:59 AM

          Thanks a lot for the help. It solved my problem. I didn’t realize macros can be so powerful :)

          T 1 Reply Last reply Mar 12, 2025, 6:03 AM Reply Quote 2
          • T
            Terry R @VarunAgw
            last edited by Mar 12, 2025, 6:03 AM

            @VarunAgw said in Navigate between section in same file quickly using keyboard shortcuts:

            I didn’t realize macros can be so powerful

            If you are keen on learning more there is the online manual (link under the ? menu). And if you get really keen on learning about regular expressions there are references to books in the FAQ section.

            Good luck
            Terry

            PS which solution did you go for?

            V 1 Reply Last reply Mar 12, 2025, 6:16 AM Reply Quote 1
            • V
              VarunAgw @Terry R
              last edited by Mar 12, 2025, 6:16 AM

              @Terry-R Thanks.

              I ended up using @Alan-Kilborn solution since it feels simpler and does the job.

              1 Reply Last reply Reply Quote 1
              • N
                n3tcom @VarunAgw
                last edited by Mar 30, 2025, 12:28 PM

                @VarunAgw I have been looking for a notes app that implements something like this for at least 15 years. The ability to define custom “Section Headers” paired with a well designed “Section List” side panel to quickly jump between sections.

                Feels like every Note app copies every other note app, so the best we get across most of the better note apps is this repurposed function list solution, or jumping into the deep-end with a markdown note app, although markdown feels too heavy for many of the simple, quick text files I find myself creating.

                Glad to see I am not alone in this, even if it is just one other person.

                A 1 Reply Last reply Mar 30, 2025, 12:53 PM Reply Quote 0
                • A
                  Alan Kilborn @n3tcom
                  last edited by Mar 30, 2025, 12:53 PM

                  @n3tcom said:

                  so the best we get across most of the better note apps is this repurposed function list solution

                  And so you yearn for something better?
                  I’m not sure what form that would take, as the function-list solution works reasonably.

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