• Login
Community
  • Login

Block-Commands:

Scheduled Pinned Locked Moved General Discussion
5 Posts 3 Posters 8.5k 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.
  • N
    Nic H. Mueller
    last edited by Jun 13, 2019, 8:28 AM

    NP++ is a great editor which I use all the time. However, there is one function I’m missing. In the 1970’s IBM came out with the ISPF editor which had and still has a very nice feature. Within the text you’re editing you can identify a block of lines and then apply commands exclusively to that block, e.g. a search-, replace- or visually-exclude command. It’s also possible to shift such a block to the right or the left. It’s even possible to apply macros to such a block. Is there similar functionality in NP++? Nick Mueller

    E 1 Reply Last reply Jun 13, 2019, 10:42 AM Reply Quote 2
    • E
      Ekopalypse @Nic H. Mueller
      last edited by Ekopalypse Jun 13, 2019, 10:43 AM Jun 13, 2019, 10:42 AM

      @Nic-H.-Mueller

      yes, most of it can be done when selecting code.
      Use the mouse or press SHIFT+ARROW_DOWN to select the block of code.
      Press TAB and/or SHIFT+TAB to move it horizontally
      or press SHIFT+CTRL+ARROW_UP/ARROW_DOWN to move the lines vertically

      Search and replace with selected block of code works as well if you check the
      In selection checkbox next to Count button (if it is not there, you need to update your npp).
      The only thing left, you cannot jump to each word you want to find in a selection as it might clear
      the selection but you can mark each occurrence of the word within the selection only.

      1 Reply Last reply Reply Quote 4
      • A
        Alan Kilborn
        last edited by Jun 13, 2019, 12:56 PM

        I don’t know that @Ekopalypse 's answer is going to satisfy the OP. It’s a good answer, but I think N++'s capabilities fall somewhat short of what the OP desires…

        Search and replace with selected block of code works as well if you check the In selection checkbox next to Count button (if it is not there, you need to update your npp).

        I would say it this way:

        Replace within selected block works if you tick the In selection checkbox next to the Replace All button and then press that button.

        You cannot jump to each word you want to find in a selection as it might clear the selection but you can mark each occurrence of the word within the selection only.

        Well, after you “mark” each occurrence (with the Search (menu) > Mark… command), you can jump between occurrences via Search (menu) > Jump Up… > Find Style …(or Jump Down…).

        E 1 Reply Last reply Jun 13, 2019, 3:40 PM Reply Quote 4
        • E
          Ekopalypse @Alan Kilborn
          last edited by Ekopalypse Jun 13, 2019, 3:40 PM Jun 13, 2019, 3:40 PM

          @Alan-Kilborn

          depending in which tab you are the button next to in selection is different, yes :-)
          With jumping I meant go through each match but do not loose created selection.

          1 Reply Last reply Reply Quote 2
          • N
            Nic H. Mueller
            last edited by Jun 17, 2019, 10:10 AM

            Thanks for your help.

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