[TxMt] Find/Replace Speed (inserting of many \n)
Hans-Joerg Bibiko
bibiko at eva.mpg.de
Fri Mar 23 08:52:48 UTC 2007
Hi,
I have a tiny suggestion.
For me it is often the case that I have to replace, let's say hex
\x0B (TAB INDENTION), with '\n'. If I do it using TM's Find/Replace
dialog it takes several minutes for a file with 400 lines and, let's
say 4000 occurrences of '\x0B'. Furthermore TM occupies a lot of my
CPUs.
If I do the same by using the 'Filter-Command' with e.g. 'perl -npe s/
\x0B/\n/g' it only takes a few seconds.
I could image that the speed problem arises if the Find/Replace
routine has to insert '\n'.
Would it make sense to include an option or button within the Find/
Replace dialog, like 'External Replace All' or whatever, to call an
external maybe perl/sed/ruby routine to do the job, esp. if I want to
insert many NEW LINES?
I don't know what kind of disadvantages it would have.
Of course, one could write a tmCommand with a dialog to do it (or
using the Filter command), but in order to avoid additional typing I
would suggest to include such a functionality within TM's Find/
Replace dialog. Esp. for users who don't know the syntax to write
such a regular expression would it be helpful, I think.
Cheers,
Hans
More information about the textmate
mailing list