On 22.08.2008, at 15:19, Adam Strzelecki wrote:
This is my biggest (well, only) complaint about TextMate. I am handling some sql dump files at the moment and TextMate runs out of steam with files bigger than 5 MB. For these bigger files I use Oxygen or Editix. I'd use TextMate for everything if it weren't for this drawback.
Do you happen to have "Check Spelling as You Type" on upon the opening? This may cause CPU drain issue with TM.
And renaming the file to *.txt helps sometimes.
But one could also do the following: given a file 'test.sql' (150MB 670000 lines) and a BASH script (only conceptually!) - go to the file location - mkdir split - split -a 4 -l 10000 test.sql split/test. - cd split - for f in `find . -name 'test*'` ; do mv $f "$f".sql; done - cd .. - mate split edit these files; make usage of Find/Replace in Project; or Ack in Project, Hypersearch, whatever if the editing is finished - cd split - cat * > ../test_edit.sql
The script splits the huge file in files with 10000 lines each in a subfolder called 'split'. Then open that subfolder via mate for editing. After editing join all files into test_edit.sql
Such a script could bound to APPLE+O. It checks if the file is greater than let's say 50MB, if so it splits it, if not it opens that file via mate.
The same strategy (see: man split) could also be used for huge XML files written in one line to insert a \n after a closing tag.
--Hans