Feature request: separate tabs for "Find in Files" and "Replace in Files"



  • Hi all,

    Just a bit of feedback. As a BI developer, I regularly make use of Notepad++ for various high-volume scans and updates across files and folders. I very much appreciate the separation of “Find” and “Replace” into separate tabs (as seems to be industry standard for such features), which minimizes the chance of accidental replacement in a search.

    However, the consolidation of the “Find all” and “Replace in Files” buttons in the same “Find in Files” tab - and on top of one another to boot! - is extremely unsettling. This admittedly powerful and useful feature is nevertheless very dangerous, far more so than the search and replace within a file because:

    1. Any replacement would take place across a host of files and not just within one;
    2. The user is not always aware of all the subfolders he is scanning, and
    3. There is no way to undo the error if one hits “Replace” when one merely wanted to hit “Find.”

    As a security measure, I make it a habit to copy the search string in both the “Find what” and “Replace what” fields in order to prevent a catastrophe should I mistakenly hit the wrong button. However, I do believe it is a serious ergonomical design error to place such a powerful and dangerous CRUD feature so close to a rather routine read-only feature.

    Might this be a point to address in future versions?

    Thanks and best regards,
    Nicholas



  • @Nicholas-Moses

    Your logic is totally invalid, and here’s why: Replace in Files has an Are You Sure? confirmation popup. Any “accidental” Replace data destruction when you really meant Find is totally on you–because you had to say “OK” to the confirmation (…thinking about it maybe “OK” and “Cancel” here would be better as “Yes” and “No”…at least “Cancel” is the default choice…but this is another matter…).

    That being said, your desire to have 2 separate tabs for Find in Files and Replace in Files is okay. I don’t see the need for it, but I respect that you want it that way. :-)



  • @Scott Sumner

    Thank you for your reply. That is useful and good information and in fact I will admit that I have never used “Replace in Files.” That does make me a little bit less paranoid about using the “Find in Files” feature.

    That said, I do think that two separate tabs would a more ergonomic choice, and safer still.



  • I would agree with Nicholas-Moses. The logic is perfectly valid whether or not there are extra safeguards in place.



  • @David-Baines

    The “invalid logic” part was about the assertion by @Nicholas-Moses that one could accidentally destroy data simply by pressing the wrong button (Replace in Files when one intended Find in Files). This data destruction simply can’t happen…because of the confirmation that must be made by the user for the replace command. Thus I stand by my original statement of “totally invalid logic”. And, BTW, @Nicholas-Moses seemed to agree with me after reading my explanation.

    Now if you, @David-Baines, meant to say that it is logical to have the file-based Find and Replace controls on separate tabs of the Find window family (without the qualifier about data loss), I’ve already stated that this personal-preference desire is fine. But my feeling is that this would be a worse user interface than the way it exists currently.



  • It seemed to me that Nicholas was offering some useful feedback about how he feels about an aspect of the design. He mentioned feeling ‘less paranoid’ knowing that there is a warning dialog that pops up.

    Personally I notice that I feel some anxiety when I’m using the Replace tab because of the ‘Replace All in All open documents’ button right next to the ‘Replace All’ button. There’s no warning dialog for that button. I’m aware that I could easily do a lot of damage to code if I’m not very careful, especially if any of the open documents have had work done on them that has not been saved. All that work could potentially be lost.

    The programmers give up lots of their time to develop N++ and make it available for free. So this isn’t meant to be critical of the program.

    Users that take the time to make comments like that are also giving up their time to provide potentially useful information to the developers.



  • @David-Baines said:

    It seemed to me that Nicholas was offering some useful feedback about how he feels about an aspect of the design

    Yes, and I acknowledged that, TWICE. :-)

    Users that take the time to make comments like that are also giving up their time to provide potentially useful information

    Yes, I ack that too. +1

    I feel some anxiety…

    Sorry for your anxious feelings. :)

    …because of the ‘Replace All in All open documents’ button right next to the ‘Replace All’ button…no warning dialog for that button

    YES! A VALID CONCERN! Maybe that button should have a confirmation as well.
    Reduce your anxiety somewhat, though, as the UNDO feature can fix an errant button press here. However, the UNDO would have to be done manually once per open document, and if one has a lot of open documents it could get rather annoying. But at that point it is a choice between annoying and not getting your original data back, so…



  • Hello, @david-baines, @scott-sumner and All,

    David, I do agree with you, regarding a warning pop-up dialog when clicking on the Replace All in All opened documents button, of the Replace dialog. It could be identical to the dialog which occurs when clicking on the Replace in Files button, in the Find in Files dialog

    Indeed, Scott, it would be sensible to add such a security level ! I, recently, did the same mistake, on more than 40 opened documents. Luckily, my search regex was restrictive enough and the replacement regex, a very specific string. So, only few files were modified ;-))

    However, David, you can identify, easily enough, the files concerned by a wrong replacement : all the tabs of the modified files, opened in N++, should have, this time, a red file icon, instead of the blue colour !

    Best Regards,

    guy038



  • @guy038 said:

    a red file icon, instead of the blue colour

    Let’s just hope that just before an errant replacement, all files were saved! Otherwise, even trying to use the Undo feature on all open (red-tabbed) files is problematic! :-(

    Now I am paranoid. For years I ignored the Replace All In All Open Documents button (don’t think I’ve ever used it, except maybe when a Community posting about it occurred and I wanted to test something out…). But NOW I am like a downhill skier, drawn inexorably and unexplainably toward that single tree in my field of view…I am going to accidentally press this button at the wrong time soon, I just know it…



  • I suggest adding a checkbox with the ability to reserve changed files. In the settings, specify the path. A reservation creates a date and a path, for example 2018-02-03_12-45-31_C_ProgramData_NewFolder
    Usually the size of text files is small, so this function will not be a problem



  • Hi, @scott-sumner,

    But NOW I am like a downhill skier, drawn inexorably and unexplainably toward that single tree in my field of view…I am going to accidentally press this button at the wrong time soon, I just know it…

    I do like your humour ! Regarding skiing, no problem ! Do not be paralysed and try the Parallel or Hockey Stop method ;-)) I do hope that you’ve got a ski helmet, just in case your speed is, still, above 0, when reaching that bloody tree !!

    Now, regarding N++, may be a new feature, which would always keep the pointer outside the Replace All in All Opened Documents button ( so only accessible after numerous hits on the Tabulation key ! ) ? Of course, I’m joking.

    Cheers,

    guy038



  • I adhere to the safety criterion:

    1. Do not press what you do not know.
    2. Before you press make a copy (always)
    3. Allow yourself to test for things that do not have value

Log in to reply