Block-Commands:



  • 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



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



  • 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…).



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



  • Thanks for your help.


Log in to reply