Reputation: 1123
I have a C file I am editing with Notepad++, and there is a section of about 30 consecutive lines where I want to replace one word with another word. Is there a way to do a Find/Replace All with Notepad++ on only that section?
Upvotes: 9
Views: 58084
Reputation: 21
The "In Selection" checkbox is a bit finicky. It doesn't always work on the first attempt. I have to repeat the cycle "Select:Search Replace:Close if checkbox greyed out". I am able to check the box on 2nd or 3rd attempt.
Also, it doesn't work when selection is done in Column Mode. Many times I just want to replace text in certain columns. But it's always greyed out when text selected in column mode.
Upvotes: 2
Reputation: 6140
There is an 'In Selection' checkbox in the Notepad++ Find/Replace dialog, right next to the 'Replace All' button. Use that and you should be good to go.
Upvotes: 22