When I use Edit Each Line In Selection (alt-command-A) on very long selections, TextMate seems to crash.<div><br></div><div>As a silly example:</div><div><br></div><div><div>for i in 1 2 3 4; do for j in /usr/bin/*; do echo $j >> test; done; done</div>
<div>paste -d ' ' test <(python -c "for n in range($(wc -l test | grep -oE '[0-9]+')): print 'is a file' ") | mate</div><div><br></div><div>This file looks like:</div><div><div>/usr/bin/BuildStrings is a file</div>
<div>/usr/bin/CpMac is a file</div><div>/usr/bin/DeRez is a file</div><div>/usr/bin/GetFileInfo is a file</div><div>/usr/bin/IPMITool is a file</div><div>/usr/bin/ImageUnitAnalyzer is a file</div><div>...</div><div><br></div>
<div>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:</div>
<div><br></div><div>- Rectangular-select the /usr/bin/ part on every line and delete it. That worked fine.</div><div>- 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.</div>
<div><br></div><div>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....</div><div><br></div>
<div><br></div><div>(Why was I trying to do this in the first place? Well, my file looked like:</div><div><br></div><div>error sending to <a href="mailto:joe@example.com">joe@example.com</a>: SMTP connection disconnected</div>
<div>error sending to <a href="mailto:bobdobalina@example.com">bobdobalina@example.com</a>: SMTP connection disconnected</div><div>...</div><div><br></div><div>and I wanted to get the list of emails out.)</div><div><br></div>
</div></div>