[TxMt] Re: File status after a replace all

Eduardo Francos efrancos at efrancos.com
Sat Sep 6 10:40:47 UTC 2014


On 6 sept. 2014, at 10:08, Allan Odgaard <mailinglist at textmate.org> wrote:

> On 5 Sep 2014, at 9:55, Eduardo Francos wrote:
> 
>> I've found a document modified status issue when using "Replace all" with either project or folder Find in... dialogs […]
> Would people be OK with Replace All (after a folder search) auto-saving changes (for non-open documents)? So it would never ask about saving and for open documents, it would do the replacement without saving anything, but for documents that have no open tab, it would simply operate on the data on disk.

That seems a good solution to me. Maybe it should handle opened but otherwise unmodified documents the same way as closed documents, and automatically save them as well.
It should also be possible to add a .tm_properties setting to have all the files saved including those with an active editor window. Some may prefer to work that way.

> Ideally after clicking Replace All the button would turn into Undo Replacements, which would give a way to revert the changes made to the non-open files.

An Undo Replacements could require making the Find in... dialog modal, otherwise the user may edit some files before closing the Find dialog, possibly rendering impossible a full and consistent undo operation.
Alternatively, when the user modifies any document then the "Undo Replacements" button could be disabled.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.macromates.com/textmate/attachments/20140906/590bf643/attachment.asc>


More information about the textmate mailing list