I have been using TM (1.5 (906)) off and on for a couple of days now and I noticed this evening that typing had become glacially slow. I ran the Activity Monitor and noticed that as I type, cocoAspell (2.0.2) was using about 70% of the processor on a 1.5 GHz PowerBook G4. I turned off "Check Spelling As You Type" and the problem went away. I haven't noticed this problem in any other app for which I am checking spelling as I type. Is this a known issue and/or is there some way for me to fix it? This is under Mac OS X 10.4.4.
Thank you,
-- Gary
On 24/1/2006, at 4:30, Gary L. Gray wrote:
I have been using TM (1.5 (906)) off and on for a couple of days now and I noticed this evening that typing had become glacially slow. I ran the Activity Monitor and noticed that as I type, cocoAspell (2.0.2) was using about 70% of the processor on a 1.5 GHz PowerBook G4. I turned off "Check Spelling As You Type" and the problem went away. I haven't noticed this problem in any other app for which I am checking spelling as I type. Is this a known issue [...]
Sort of. TextMate will re-check the entire line (or at least the subset for which spell checking hasn't been disabled through scope specific preferences) on each mutating action whereas NSTextView only checks when you move the caret away from a word (afaik) -- so TM is calling the spell checker much more than NSTextView, which can be a problem if the spell checking isn't fast.
I currently do not have any plans of changing this.
On Jan 23, 2006, at 10:54 PM, Allan Odgaard wrote:
On 24/1/2006, at 4:30, Gary L. Gray wrote:
I have been using TM (1.5 (906)) off and on for a couple of days now and I noticed this evening that typing had become glacially slow. I ran the Activity Monitor and noticed that as I type, cocoAspell (2.0.2) was using about 70% of the processor on a 1.5 GHz PowerBook G4. I turned off "Check Spelling As You Type" and the problem went away. I haven't noticed this problem in any other app for which I am checking spelling as I type. Is this a known issue [...]
Sort of. TextMate will re-check the entire line (or at least the subset for which spell checking hasn't been disabled through scope specific preferences) on each mutating action whereas NSTextView only checks when you move the caret away from a word (afaik) -- so TM is calling the spell checker much more than NSTextView, which can be a problem if the spell checking isn't fast.
I currently do not have any plans of changing this.
That is disappointing. This makes it *really* hard to use TextMate with LaTeX source code.
How are others checking their spelling when writing LaTeX source?
-- Gary
On 24/1/2006, at 5:01, Gary L. Gray wrote:
I currently do not have any plans of changing this.
That is disappointing. This makes it *really* hard to use TextMate with LaTeX source code.
How are others checking their spelling when writing LaTeX source?
TextMate is smart enough to not underline your keywords and commands, so just use the system spell checker if your language is supported.
On Jan 23, 2006, at 11:07 PM, Allan Odgaard wrote:
On 24/1/2006, at 5:01, Gary L. Gray wrote:
I currently do not have any plans of changing this.
That is disappointing. This makes it *really* hard to use TextMate with LaTeX source code.
How are others checking their spelling when writing LaTeX source?
TextMate is smart enough to not underline your keywords and commands, so just use the system spell checker if your language is supported.
Aha! That is good news. :-)
Thank you,
-- Gary
On 24/01/2006, at 6:00, Gary L. Gray wrote:
TextMate is smart enough to not underline your keywords and commands, so just use the system spell checker if your language is supported.
Aha! That is good news. :-)
Well maybe, cause I use the built in spell checker too, and it pretty much makes it useles in LaTeX. Try this: Write a long line spreading across say 10 lines in softwrap and enable spell checker. Then try to add something to the line etc. This littereally takes _seconds_ on my machine. I don't know if it matters how many words are miss-spelled, but that's likely to make it even slower I suppose (for that, use the lorem snippet to generate the text).
That said, it's not really a problem when used in the languages where the checker is only applied to limited portions.
-- Sune.
TextMate is smart enough to not underline your keywords and commands, so just use the system spell checker if your language is supported.
What am I doing wrong ? While some keywords are well recognized (\label, \begin, \date), others are certainly not. I find many LaTeX commands such as \noindent, \rightarrow, \maketitle, \renewcommand ... that are underlined. Do I have to teach them ? and how ?
Regards
Christof
On 24/1/2006, at 13:11, Christof Janssen wrote:
TextMate is smart enough to not underline your keywords and commands, so just use the system spell checker if your language is supported.
What am I doing wrong ? While some keywords are well recognized (\label, \begin, \date), others are certainly not. I find many LaTeX commands such as \noindent, \rightarrow, \maketitle, \renewcommand ... that are underlined. Do I have to teach them ? and how ?
All those are correctly recognized (and not underlined) if I paste them into a LaTeX document.
Did you disable the Source bundle (Filter List…)? As that has the default spell checking settings (i.e. disable for keyword.*) or maybe you have an old LaTeX language grammar (check ~/Library/Application Support/TextMate/Bundles/LaTeX.tmbundle).
You can press ctrl-shift P on the keyword to see what scope is assigned to it.
Am 24. Jan 2006 um 13:29 schrieb Allan Odgaard:
On 24/1/2006, at 13:11, Christof Janssen wrote:
TextMate is smart enough to not underline your keywords and commands, so just use the system spell checker if your language is supported.
What am I doing wrong ? While some keywords are well recognized (\label, \begin, \date), others are certainly not. I find many LaTeX commands such as \noindent, \rightarrow, \maketitle, \renewcommand ... that are underlined. Do I have to teach them ? and how ?
All those are correctly recognized (and not underlined) if I paste them into a LaTeX document.
Did you disable the Source bundle (Filter List…)?
No, but I disabled several others in order to keep the popups as small as possible. Included are the Latex and the LaTeX bundles, however.
As that has the default spell checking settings (i.e. disable for keyword.*) or maybe you have an old LaTeX language grammar (check ~/ Library/Application Support/TextMate/Bundles/LaTeX.tmbundle).
There are two LaTeX bundles. Since I have just downloaded and installed the most recent version of TextMate 1.5(906) I don't think that this should be the problem. Actually there are two such files in Application SupportTextMate/Bundles/ . One LaTeX.tmbundle, the other LaTeX 2.mbundle, dating from 2005 and 2006, respectively. I renamed the second one to the first one, but to no effect.
You can press ctrl-shift P on the keyword to see what scope is assigned to it.
Both, underlined and non-underlined words have scopes assigned to it. Eg \newcommand (which appears underlined) is assigned to text.latex and storage.type.function.tex. The command \label on the other hand is not underlined and assigned to text.latex, meta.ref-or- label.latex and keyword.control.ref-or-label.latex.
Frankly, I don't know what this means. I just wonder what spell checker is activated anyway. How do I control that ?
Christof
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 24/1/2006, at 13:58, Christof Janssen wrote:
As that has the default spell checking settings (i.e. disable for keyword.*) or maybe you have an old LaTeX language grammar (check ~/Library/Application Support/TextMate/Bundles/LaTeX.tmbundle).
There are two LaTeX bundles. Since I have just downloaded and installed the most recent version of TextMate 1.5(906) I don't think that this should be the problem.
The LaTeX bundle contain both the LaTeX language grammar and auxiliary information about what parts of the document spell checking should be disabled for.
If you did not make any LaTeX customizations (which you want to keep at least) then remove both bundles (to reset to the defaults) -- renaming will only do that if you rename (move) them out of the Bundles folder.
The same goes for the Source bundle.
You can press ctrl-shift P on the keyword to see what scope is assigned to it.
Both, underlined and non-underlined words have scopes assigned to it. Eg \newcommand (which appears underlined) is assigned to text.latex and storage.type.function.tex. The command \label on the other hand is not underlined and assigned to text.latex, meta.ref- or-label.latex and keyword.control.ref-or-label.latex.
Frankly, I don't know what this means. I just wonder what spell checker is activated anyway. How do I control that ?
The scope (shown with ctrl-shift P) is what name the language grammar [1] assigns to that particular language element.
The scopes you quote sounds correct. There is then a preferences item [2] in the Source bundle (named “Spell Checking: Disable for Source”) which has “source, constant, keyword, storage, support, variable” as scope selector [3].
This should cause spell checking to be disabled for all these scopes. Something like \newcommand should be affected by this, as it has scope storage.* (which is in the scope selector to disable spell checking).
[1] http://macromates.com/textmate/manual/language_grammars [2] http://macromates.com/textmate/manual/preferences_items [3] http://macromates.com/textmate/manual/scope_selectors
Am 24. Jan 2006 um 14:15 schrieb Allan Odgaard:
On 24/1/2006, at 13:58, Christof Janssen wrote:
As that has the default spell checking settings (i.e. disable for keyword.*) or maybe you have an old LaTeX language grammar (check ~/Library/Application Support/TextMate/Bundles/LaTeX.tmbundle).
There are two LaTeX bundles. Since I have just downloaded and installed the most recent version of TextMate 1.5(906) I don't think that this should be the problem.
The LaTeX bundle contain both the LaTeX language grammar and auxiliary information about what parts of the document spell checking should be disabled for.
If you did not make any LaTeX customizations (which you want to keep at least) then remove both bundles (to reset to the defaults) -- renaming will only do that if you rename (move) them out of the Bundles folder.
The same goes for the Source bundle.
Great, that did the trick ! This looks just perfect now.
You can press ctrl-shift P on the keyword to see what scope is assigned to it.
Both, underlined and non-underlined words have scopes assigned to it. Eg \newcommand (which appears underlined) is assigned to text.latex and storage.type.function.tex. The command \label on the other hand is not underlined and assigned to text.latex, meta.ref-or-label.latex and keyword.control.ref-or-label.latex.
Frankly, I don't know what this means. I just wonder what spell checker is activated anyway. How do I control that ?
The scope (shown with ctrl-shift P) is what name the language grammar [1] assigns to that particular language element.
The scopes you quote sounds correct. There is then a preferences item [2] in the Source bundle (named “Spell Checking: Disable for Source”) which has “source, constant, keyword, storage, support, variable” as scope selector [3].
This should cause spell checking to be disabled for all these scopes. Something like \newcommand should be affected by this, as it has scope storage.* (which is in the scope selector to disable spell checking).
[1] http://macromates.com/textmate/manual/language_grammars [2] http://macromates.com/textmate/manual/preferences_items [3] http://macromates.com/textmate/manual/scope_selectors
Thank you for providing this additional information - I will need some time to digest all that information. For a TextMate newbie and a non-IT guy like me the language is not easy to gasp.
Christof
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 24/01/2006, at 13:30, Allan Odgaard wrote:
On 24/1/2006, at 13:05, Sune Foldager wrote:
That said, it's not really a problem when used in the languages where the checker is only applied to limited portions.
Or if you're lucky enough to have a faster machine.
Gary's wasn't fast enough either, unless this really is a CocoaSpell issue ;-). But yes, of course, and I hope to get one in not too long, too.
-- Sune.
On 24/1/2006, at 16:24, Sune Foldager wrote:
Or if you're lucky enough to have a faster machine.
Gary's wasn't fast enough either, unless this really is a CocoaSpell issue ;-)
In his case, it was.
As for your slowdown with misspelled words, that could actually be more of a rendering problem (of the underline which is a tiled dot), although I do seem to recall that the Shark report indicated that most time was spent in the spelling server -- maybe for non- recognized words they go through a lot of extra steps (to check for inflections).
On Jan 24, 2006, at 7:05 AM, Sune Foldager wrote:
On 24/01/2006, at 6:00, Gary L. Gray wrote:
TextMate is smart enough to not underline your keywords and commands, so just use the system spell checker if your language is supported.
Aha! That is good news. :-)
Well maybe, cause I use the built in spell checker too, and it pretty much makes it useles in LaTeX. Try this: Write a long line spreading across say 10 lines in softwrap and enable spell checker. Then try to add something to the line etc. This littereally takes _seconds_ on my machine. I don't know if it matters how many words are miss-spelled, but that's likely to make it even slower I suppose (for that, use the lorem snippet to generate the text).
That said, it's not really a problem when used in the languages where the checker is only applied to limited portions.
I have disabled cocoAspell and enabled the built-in Mac OS X spell checker to check spelling as I type and I am not seeing the slowdown you describe for long lines. I have soft-wrapped paragraphs that are 20+ lines long and I can type very quickly within them.
-- Gary
On 24/01/2006, at 15:40, Gary L. Gray wrote:
I have disabled cocoAspell and enabled the built-in Mac OS X spell checker to check spelling as I type and I am not seeing the slowdown you describe for long lines. I have soft-wrapped paragraphs that are 20+ lines long and I can type very quickly within them.
Just retested. 10 lines of the word 'this' and there is no slowdown. 10 lines of lorem ipsum etc. or other miss-spelled words, and it's at least a second(sic) per character typed. This happened a few times for me with danish text, since there is no spell checker for it shipping.
-- Sune.
On Jan 24, 2006, at 10:28 AM, Sune Foldager wrote:
On 24/01/2006, at 15:40, Gary L. Gray wrote:
I have disabled cocoAspell and enabled the built-in Mac OS X spell checker to check spelling as I type and I am not seeing the slowdown you describe for long lines. I have soft-wrapped paragraphs that are 20+ lines long and I can type very quickly within them.
Just retested. 10 lines of the word 'this' and there is no slowdown. 10 lines of lorem ipsum etc. or other miss-spelled words, and it's at least a second(sic) per character typed. This happened a few times for me with danish text, since there is no spell checker for it shipping.
I just took a very short LaTeX document and pasted in Lorem ipsum twice from the Text bundle. When I start typing in the middle of that text, it becomes painfully slow, and as I said before, I have cocoAspell disabled and am only using the built-in checker. I just tried the same thing in TeXShop and I am not seeing the same slow-down.
-- Gary
On 24/01/2006, at 20:04, Gary L. Gray wrote:
I just took a very short LaTeX document and pasted in Lorem ipsum twice from the Text bundle. When I start typing in the middle of that text, it becomes painfully slow, and as I said before, I have cocoAspell disabled and am only using the built-in checker. I just tried the same thing in TeXShop and I am not seeing the same slow- down.
Likely it's, as Allan suggested, due to a very high complexity of the spelling checker in the case of miss-spelled words (to be sure, it's expected that it takes the longest in that case, but the difference seems to be rather large). That TeXShop doesn't slow down is most likely because it uses NSTextView which caches and updates differently.
-- Sune.
On Jan 24, 2006, at 2:16 PM, Sune Foldager wrote:
On 24/01/2006, at 20:04, Gary L. Gray wrote:
I just took a very short LaTeX document and pasted in Lorem ipsum twice from the Text bundle. When I start typing in the middle of that text, it becomes painfully slow, and as I said before, I have cocoAspell disabled and am only using the built-in checker. I just tried the same thing in TeXShop and I am not seeing the same slow- down.
Likely it's, as Allan suggested, due to a very high complexity of the spelling checker in the case of miss-spelled words (to be sure, it's expected that it takes the longest in that case, but the difference seems to be rather large). That TeXShop doesn't slow down is most likely because it uses NSTextView which caches and updates differently.
OK, but there must be a reason that TextMate is slow when the others aren't in exactly the same circumstances.
In addition, is there way to change TextMate's undo behavior? It undoes one character at a time and that is rather painful when one wants to undo a lot of typing.
-- Gary
On 24/1/2006, at 20:23, Gary L. Gray wrote:
OK, but there must be a reason that TextMate is slow when the others aren't in exactly the same circumstances.
The others being NSTextView, and as mentioned, it's because NSTextView doesn't call the spell checker as often as TM does.
In addition, is there way to change TextMate's undo behavior? [...]
No, but it's on the to-do.
On Jan 23, 2006, at 10:01 PM, Gary L. Gray wrote:
That is disappointing. This makes it *really* hard to use TextMate with LaTeX source code.
How are others checking their spelling when writing LaTeX source?
I have no performance hits here. Can you perhaps share with us, or email me, the troublesome file, along with your comp's specs? Or is this a general phenomenon?
Upon reflection, I realize I don't have cocoAspell installed any more. I just use the built in spell-checker. Maybe you could try disabling cocoAspell and seeing how the performance is then? Btw, what are the advantages of cocoAspell?
-- Gary
Haris