Aristide Grange wrote:
Data: a 2.5 MB text file (plain text / no coloration / 225800 lines, none exceeding 30 characters) structured as follows:
ABACA~ ABACULE~ ABAISSABLE~ ABAISSAIENT~
Problem: Replace all the 225800 occurrences of "~\n" by "\n" (iMac G4 800 Mhz, 1GB ram, 10.4.6): TextWrangler: 30 s (gracefully interruptible) TextMate: who knows? (forced to quit after 15 mn)
I'm sure we've been through this whole thing before... OK, let's make such a beast: if the stuff between the lines is "long.pl" then
./long.pl > long.txt
gives a suitable test file called long.txt ======================================================================= #!/usr/bin/perl foreach (1..60000){ print<<END; ABACA~ ABACULE~ ABAISSABLE~ ABAISSAIENT~ END } =======================================================================
Looks like there is some psychological issue here, indeed. ;-) I do love TextMate. But for such search/replacements, I couldn't live without TextWrangler.
I can: I do. My withdrawal from BareBones is complete (I still own a current BBEdit license; well, I think it's current -- they might have tried to gouge another slab of upgrade cash from registered users while I haven't been watching). Anyhow... ignoring that(!).
Just be a tiny bit creative here: for example, if you want to search/ replace in a massive file such as long.txt use TextMate's integration with standard unix utilities: for example...
Text => Filter through command...
perl -pe 's#~\n#\n#'
On my eMac (similarly configured to your imac) it's about 12 seconds to do the replacement, and the command is no harder than any Find/ Replace dialog box. Yes, the built-in mechanism should probably behave better, but it's *really* easy to work around. Unless, of course, you're simply hunting for nits to pick.
Cheers, Paul