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.
    • Thomas ZitoT
      Thomas Zito
      last edited by

      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?

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

        @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
        • notdodgeballN
          notdodgeball
          last edited by notdodgeball

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