Re: Spell checking in comments only

2006-10-15 Thread Paul Irofti
On Sunday 15 October 2006 11:06, Przemyslaw Gawronski wrote:
 Hi, when writing code in Python, C, HTML (or any other) I would like
 to have spell checking only in comments. Is that possible? If so, how
 can I set it up?

 Thanks

 Przemek

Have you tried it? I remember enabling spelling once when I was in a C 
file, and it only underlined the flawed words in comments, the code was 
pretty much ignored...


Re: Spell checking in comments only

2006-10-15 Thread Przemyslaw Gawronski
 Have you tried it? 

Yes, with python code, and I get highlighting of 'def', 'class' (as a
first word in sentence and not capitalized).

I tried with html and php code, and spelling isn't working at all.

 I remember enabling spelling once when I was in a C file, and it only
 underlined the flawed words in comments, the code was pretty much
 ignored...

Well, in my python code it didn't :(

Przemek
-- 
AIKIDO TANREN DOJO  -   Poland - Warsaw - Mokotow - Ursynow - Natolin
info: http://www.tanren.pl/ phone: +4850151 email: [EMAIL PROTECTED]


Re: Spell checking in comments only

2006-10-15 Thread Yakov Lerner

On 10/15/06, Przemyslaw Gawronski [EMAIL PROTECTED] wrote:

 Have you tried it?

Yes, with python code, and I get highlighting of 'def', 'class' (as a
first word in sentence and not capitalized).

I tried with html and php code, and spelling isn't working at all.

 I remember enabling spelling once when I was in a C file, and it only
 underlined the flawed words in comments, the code was pretty much
 ignored...

Well, in my python code it didn't :(


I think you need to change this line in your
$VIMRUNTIME/syntax/python.vim:

syn match   pythonComment   #.*$ contains=pythonTodo

to this:

syn match   pythonComment   #.*$ contains=pythonTodo @Spell

and notify syntax maintainer.

Yakov


Re: Spell checking in comments only

2006-10-15 Thread Przemyslaw Gawronski
 syn match   pythonComment   #.*$ contains=pythonTodo @Spell

This one worked:

syn match   pythonComment   #.*$ [EMAIL PROTECTED]

Thanks!

Przemek
-- 
AIKIDO TANREN DOJO  -   Poland - Warsaw - Mokotow - Ursynow - Natolin
info: http://www.tanren.pl/ phone: +4850151 email: [EMAIL PROTECTED]


Re: Spell checking in comments only

2006-10-15 Thread Przemyslaw Gawronski
syn match   pythonComment   #.*$ contains=pythonTodo @Spell

With this one I get this error opening py file:

E475: Wrong argument: pythonComment^I#.*$ contains=pythonTodo @Spell

 ...but it won't highlight TODO items in comments; 

 and if you don't notify the maintainer, any upgrade may silently
 remove any changes you made in files in the $VIMRUNTIME tree.

Yes, wright! Once I get it working correctly I'll notify the maintainer.

Przemek
-- 
AIKIDO TANREN DOJO  -   Poland - Warsaw - Mokotow - Ursynow - Natolin
info: http://www.tanren.pl/ phone: +4850151 email: [EMAIL PROTECTED]


Re: Spell checking in comments only

2006-10-15 Thread A.J.Mechelynck

Przemyslaw Gawronski wrote:

syn match   pythonComment   #.*$ contains=pythonTodo @Spell


With this one I get this error opening py file:

E475: Wrong argument: pythonComment^I#.*$ contains=pythonTodo @Spell


Maybe contains=pythonTodo,@Spell with a comma instead of a space?



...but it won't highlight TODO items in comments; 



and if you don't notify the maintainer, any upgrade may silently
remove any changes you made in files in the $VIMRUNTIME tree.


Yes, wright! Once I get it working correctly I'll notify the maintainer.

Przemek




Re: Spell checking in comments only

2006-10-15 Thread Przemyslaw Gawronski
 Maybe contains=pythonTodo,@Spell with a comma instead of a space?

Works perfectly!

and if you don't notify the maintainer, any upgrade may silently
remove any changes you made in files in the $VIMRUNTIME tree.

Now I can send info to maintainer.

Thanks for help!

Przemek
-- 
AIKIDO TANREN DOJO  -   Poland - Warsaw - Mokotow - Ursynow - Natolin
info: http://www.tanren.pl/ phone: +4850151 email: [EMAIL PROTECTED]