[TxMt] Re: File status after a replace all
Matt Neuburg
matt at tidbits.com
Sat Sep 6 14:15:12 UTC 2014
On Sep 6, 2014, at 1:08 AM, Allan Odgaard <mailinglist at textmate.org> wrote:
> 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.
I'm someone who does a _lot_ of folder-wide find-and-replace (I still think of this as project-wide, sorry) and this sounds great to me!
The need to save manually afterwards is something I've gotten used to but I've always been somewhat mystified by it. Basically I always want to find/replace/save.
(After all, I'm always under version control, and if I'm in any doubt of the wisdom of a particular change in a particular place, even after previewing what's going to happen, I can always open that document and run through it manually and separately. In the case of very complex and scary regular expression global-find-and-replace I have been known to open every single document individually and do the find-and-replace manually over each one, and I don't mind that at all.) m.
PS This is not directly relevant, but the manual Find dialog has a Replace & Find button but lacks a Replace button (i.e. replace but don't find, so I can inspect the change I just made). It desperately needs this. A common pattern is Replace (but don't Find), look at what this did, now do a Next, then repeat, so that you can look at what you're doing as you go. This is so important that I often switch to BBEdit just to do my replacing! And BBEdit has keyboard shortcuts for both of these. Indeed, in my opinion Replace (but don't Find) should be the default; Replace & Find should be a separate option, possibly its alternate when you hold the Option key or similar.
--
matt neuburg, phd = http://www.apeth.net/matt/
pantes anthropoi tou eidenai oregontai phusei
Programming iOS 7! http://shop.oreilly.com/product/0636920031017.do
iOS 7 Fundamentals! http://shop.oreilly.com/product/0636920032465.do
RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
More information about the textmate
mailing list