• Login
Community
  • Login

Is there a jump to next inner block, or jump out of block command?

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
3 Posts 3 Posters 96 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.
  • T
    Thomas Zito
    last edited by Apr 8, 2025, 2:04 AM

    foreach (sum > product) {
    //block 0
    if (x > y) {
    |
    // block 1
    if (y > z) {
    // block 2
    }
    } // end of block 1
    }

    Suppose cursor was |. You’re inside of block 1. Next inner block would be if (y > z), or block 2. Jumping out should either send you to the end of block 1. Jumping backward would be like, to the start of block 0, maybe? or to the start of block 1, idk.

    Note++, has this implemented?

    A 1 Reply Last reply Apr 8, 2025, 11:01 AM Reply Quote 0
    • A
      Alan Kilborn @Thomas Zito
      last edited by Apr 8, 2025, 11:01 AM

      @Thomas-Zito

      Perhaps your question is better-asked with code that is formatted reasonably, e.g.:

      foreach (sum > product) {
          //block 0
          if (x > y) {
              |
              // block 1
              if (y > z) {
                  // block 2
              }
          } // end of block 1
      }
      

      In Notepad++, it might appear like this:

      8a475cf3-80d2-4964-954a-dc6a867d1fd8-image.png

      Now that we have a good visual on it, your question probably becomes “Is there a way to jump to the various fold points?” The answer is no, not in native Notepad++. But it could be done via scripting.

      1 Reply Last reply Reply Quote 4
      • N
        notdodgeball
        last edited by notdodgeball Apr 8, 2025, 4:09 PM Apr 8, 2025, 4:08 PM

        If your “blocks” are separated by a line break, you can use the commands:

        SCI_PARADOWN  Ctrl+]
        SCI_PARAUP    Ctrl+[
        

        as they navigate between paragraphs.

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