Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way to make Notepad++ to ask for confirmation when replacing all instances of a string in a file or files?

This is to prevent inadvertent replacement.

share|improve this question
    
Can't you just replace one by one instead of doing replace all? –  terdon Aug 21 '12 at 14:40
    
Sublime Text 2 asks for a confirmation when replacing multiple instances. Besides, Sublime Text 2 is awesome. –  amiregelz Aug 22 '12 at 14:09

1 Answer 1

Not that I know of. If you're modifying a single file, I don't think it's needed.

Clicking Replace All always displays a dialog showing how many occurrences were replaced. To revert the changes, just give focus to the text window and Ctrl + Z to undo the last operation.

share|improve this answer
    
Would this undo all changes in all the files changed? –  mpajoh Aug 21 '12 at 14:47
    
I think it would apply to each instance a repacement was performed. 52 replacements? Then you would need to ctrl+z 52 times, or, just hold the two keys down for a few seconds and let the keyboard do the repeating for you.. (this takes a little skill)> –  hydroparadise Aug 21 '12 at 15:32
    
So, this means if the string was replaced in 30 files, and say 10 times in each files then one has to do what?:( –  mpajoh Aug 21 '12 at 17:06
    
@mpajoh: I don't have Windows installed right now, so I can't confirm if you can undo edits in all files simultaneously, but you only have to press the key combination once to undo all replaces in one file. –  sudo Aug 21 '12 at 17:08
    
@mpajoh just try it yourself... It undoes all replacements in one file for sure, but I've never used "replace in all open files" so I don't know if ctrl+z also undoes in all files. –  Luc Aug 21 '12 at 17:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.