GVIM 7 spelling highlight woes

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

GVIM 7 spelling highlight woes

Halim, Salman
Hello,

I just acquired GVIM 7.0aa-0110 from Tony Mechelynck's site (thanks
Tony!).  My previous version was 94.  The thing I've noticed is that my
Java source files, with 'spell' on, highlight certain bits of code as
spelling errors that are not inside comments.  For example:

    public class asdfasdf

The asdfasdf gets highlighted as a spelling error (it has no syntax
attribute attached to it), even though it's not inside a comment.  In
version 94, this was not the case.  Basically, the upgrade has caused
vast amounts of source code to get highlighted as spelling errors...

Thank you,

Salman.
Reply | Threaded
Open this post in threaded view
|

Re: GVIM 7 spelling highlight woes

Bram Moolenaar

Salman Halim wrote:

> I just acquired GVIM 7.0aa-0110 from Tony Mechelynck's site (thanks
> Tony!).  My previous version was 94.  The thing I've noticed is that my
> Java source files, with 'spell' on, highlight certain bits of code as
> spelling errors that are not inside comments.  For example:
>
>     public class asdfasdf
>
> The asdfasdf gets highlighted as a spelling error (it has no syntax
> attribute attached to it), even though it's not inside a comment.  In
> version 94, this was not the case.  Basically, the upgrade has caused
> vast amounts of source code to get highlighted as spelling errors...

This happened because the Java syntax file includes the HTML syntax
file, which contains "syntax spell toplvel" to spell check text at the
toplevel.  But we don't want that for Java, thus the HTML syntax file
needs to be adjusted:

*** runtime/syntax/html.vim~ Mon Jul 18 13:51:06 2005
--- runtime/syntax/html.vim Wed Jul 20 22:01:11 2005
***************
*** 27,33 ****
 
  syn case ignore
 
! syn spell toplevel
 
  " mark illegal characters
  syn match htmlError "[<>&]"
--- 27,35 ----
 
  syn case ignore
 
! if main_syntax == "html"
!   syn spell toplevel
! endif
 
  " mark illegal characters
  syn match htmlError "[<>&]"

--
FATHER: We are here today to witness the union of two young people in the
        joyful bond of the holy wedlock.  Unfortunately, one of them, my son
        Herbert, has just fallen to his death.
   [Murmurs from CROWD;  the BRIDE smiles with relief, coughs.]
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
 \\\     Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html   ///