[TxMt] Edit Each Line In Selection unusable for very long selections

Dougal dougal at gmail.com
Tue Nov 11 18:56:48 UTC 2008

When I use Edit Each Line In Selection (alt-command-A) on very long
selections, TextMate seems to crash.
As a silly example:

for i in 1 2 3 4; do for j in /usr/bin/*; do echo $j >> test; done; done
paste -d ' ' test <(python -c "for n in range($(wc -l test | grep -oE
'[0-9]+')): print 'is a file' ") | mate

This file looks like:
/usr/bin/BuildStrings is a file
/usr/bin/CpMac is a file
/usr/bin/DeRez is a file
/usr/bin/GetFileInfo is a file
/usr/bin/IPMITool is a file
/usr/bin/ImageUnitAnalyzer is a file

On my system, this has 3752 lines. Say now that I have it open, I want to
change this into just the list of executable names: BuildStrings, CpMac,
etc. The best way to do this would probably be to do a find-and-replace;
that's really easy, in fact. But it's not the first thing that popped into
my head. Instead, I tried to do it like this:

- Rectangular-select the /usr/bin/ part on every line and delete it. That
worked fine.
- Select every line (command-A) and go into edit-each-line mode, to delete
the "is a file" part. I can go into the edit mode okay, but as soon as I hit
backspace, TextMate becomes unresponsive, its memory usage skyrockets, and
basically nothing happens until I kill it.

Is this a known problem? Why is edit-each-line mode so memory-intensive?
It's not a major issue, since the workaround is in fact easier than this way
of doing it, but still....

(Why was I trying to do this in the first place? Well, my file looked like:

error sending to joe at example.com: SMTP connection disconnected
error sending to bobdobalina at example.com: SMTP connection disconnected

and I wanted to get the list of emails out.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20081111/1a344eda/attachment.html>

More information about the textmate mailing list