Find / Replace swap in 8.2.1
-
So Notepad++ 8.2.1 introduces a new “swap” button in the Replace window, for swapping the data in the Find what and Replace with boxes:
Cool enough.
But what’s also cool about it, is it can be used for a multi-line search and replace, something N++ hasn’t been able to do before now.
Here’s how:
-
Select the multiline text you want to use as the replacement text. If you don’t have that text in your document (common), compose it there temporarily.
-
Press Ctrl+f. This will get your replacement text into the Find what box.
-
Press … the new swap button. This will get your replacement text into the Replace with box.
-
Select the multiline text you want to search for, and thus replace in the end. Press Ctrl+f.
-
Use the Replace or Replace All buttons to do the replacement(s).
Note that although your multiline text appears like it is one line in the boxes, it is actually multiline.
-