Hi, I use Version 1.5.5 (1368) on Intel MacBookPro 10.4.10 and have the following problem:
if I want to open an 400 KB large xml or html file, TM needs over 10 minutes to open it. Is this normal? How can I increase the loading speed?
Thanks, ALex.
On 3. Jul 2007, at 10:13, Alex Greif wrote:
if I want to open an 400 KB large xml or html file, TM needs over 10 minutes to open it. Is this normal? How can I increase the loading speed?
There are two factors that can slow it down:
1. Very long lines. This is mostly solved by enabling soft wrap (in the View menu). 2. Some grammar issue, although generally should not stall the initial rendering of the file.
For #2 we’ll need to see the file. For #1, you’ll have to wait for 2.0 for this to be resolved.
Is there any chance that TextMate 1.x can be modified slightly to just enable softwrap automatically when there are like 200+ columns? Could someone do it in a plugin somehow? Currently the workaround is to: force quit TextMate make a new document of that same syntax and enable softwrap and then close it and reopen the offending document.
I know you're trying to focus on 2.0, but this issue is a major hassle. I regularly have to deal with html documents that have been stripped of all newlines.
thomas Aylott — subtleGradient
On Jul 3, 2007, at 10:40 AM, Allan Odgaard wrote:
- Very long lines. This is mostly solved by enabling soft wrap
(in the View menu).
At 12:03 Uhr -0400 03.07.2007, Thomas Aylott (subtleGradient) wrote:
I regularly have to deal with html documents that have been stripped of all newlines.
Well, maybe this isn't the kind of solution you're looking for, but... Wouldn't it be better to use the "tidy" tool on these files _before_ opening them in TextMate? After all, it isnt't fun to work with "no linebreaks" HTML files anyway.
Using the following command line in the Terminal should give you a cleanly formatted file and leave most of the HTML code itself untouched:
tidy -o destiny.html -iq -wrap 70 --tab-size 4 --indent-spaces 4 source.html
Kind regards, Tobias
On Jul 5, 2007, at 6:30 AM, Tobias Jung wrote:
At 12:03 Uhr -0400 03.07.2007, Thomas Aylott (subtleGradient) wrote:
I regularly have to deal with html documents that have been stripped of all newlines.
Well, maybe this isn't the kind of solution you're looking for, but... Wouldn't it be better to use the "tidy" tool on these files _before_ opening them in TextMate? After all, it isnt't fun to work with "no linebreaks" HTML files anyway.
Using the following command line in the Terminal should give you a cleanly formatted file and leave most of the HTML code itself untouched:
tidy -o destiny.html -iq -wrap 70 --tab-size 4 --indent-spaces 4 source.html
Kind regards, Tobias
unfortunately the whole reason I have to load these files is to debug them asis. tidy-ing them would break their brokenness thomas Aylott — subtleGradient
On 5 Jul 2007, at 16:32, Thomas Aylott (subtleGradient) wrote:
On Jul 5, 2007, at 6:30 AM, Tobias Jung wrote:
At 12:03 Uhr -0400 03.07.2007, Thomas Aylott (subtleGradient) wrote:
I regularly have to deal with html documents that have been stripped of all newlines.
Well, maybe this isn't the kind of solution you're looking for, but...
Here is my solution of the same kind ;)
If I have such a huge one line xml/html document I use the "Filter through Command'
Command: cat myhugefile.xml | perl -pe 's/</(.*?)>/</$1>\n/g' Input: None Output: Create New Document
By doing so I can 'handle' html files with a size of some MegaBytes with TM.
One could fine-tune it to insert a \n after let's say 4 closing tags.
Or one could also add s/<br>/<br>\n/g or something like that.
If I want to sustain the original structure I use:
Command: cat myhugefile.xml | perl -pe 's/</(.*?)>/</$1>§§\n/g' Input: None Output: Create New Document
in order to distinguish between a 'original' line break and 'my temporary' line break. Thus I can delete all §§\n after my editing easily by using perl.
####
I know maybe you did it but only in case you didn't: UNCHECK!! -> Check Spelling As You Type
####
I don't know whether it would increase the speed of TM in such a case if it would be possible to switch off the undo buffer/function?
Hans