(X)HTML: No syntax colouring on very long lines

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

(X)HTML: No syntax colouring on very long lines

A.J.Mechelynck
Just noticed this while viewing an XHTML file with very long lines. (The
file was not from me, it was produced by "View source with" in Firefox on an
external Web page, http://en.wikipedia.org/w/index.php?title=Wikipedia:Babel 
. The page is in UTF-8 without BOM.)

&filetype == "xhtml"
&syntax == "xhtml"
&encoding == "utf-8"
&fileencoding == "utf-8"
syn sync fromstart
Using gvim 7.00aa.0123 on W32

What I see: On a very long line (line 33 in the current version of the
file), everything beyond horizontal cursor position "3000-2966" is colored
in black-on-white (as if per "Normal" highlight) instead of displaying the
syntax colours corresponding to the text. When displayed in a gvim set up
for Latin1 (":set enc=latin1 fencs= "), colouring stops on the same byte
(3000), not on the same screen position.

What I think I should have seen: (X)HTML syntax highlighting all over.

$VIMRUNTIME/syntax/xhtml.vim (2003 Feb 04) simply calls syntax/html.vim
$VIMRUNTIME/syntax/html.vim (2005 Jul 20) maintained by Claudio Fleiner


Best regards,
Tony.


Reply | Threaded
Open this post in threaded view
|

Re: (X)HTML: No syntax colouring on very long lines

Bram Moolenaar

Tony Mechelynck wrote:

> Just noticed this while viewing an XHTML file with very long lines. (The
> file was not from me, it was produced by "View source with" in Firefox on an
> external Web page, http://en.wikipedia.org/w/index.php?title=Wikipedia:Babel 
> . The page is in UTF-8 without BOM.)
>
> &filetype == "xhtml"
> &syntax == "xhtml"
> &encoding == "utf-8"
> &fileencoding == "utf-8"
> syn sync fromstart
> Using gvim 7.00aa.0123 on W32
>
> What I see: On a very long line (line 33 in the current version of the
> file), everything beyond horizontal cursor position "3000-2966" is colored
> in black-on-white (as if per "Normal" highlight) instead of displaying the
> syntax colours corresponding to the text. When displayed in a gvim set up
> for Latin1 (":set enc=latin1 fencs= "), colouring stops on the same byte
> (3000), not on the same screen position.
>
> What I think I should have seen: (X)HTML syntax highlighting all over.

This is a new feature: highlighting XML was very slow for long lines.
And some people were editing big single-line XML files.  That looked
like Vim was stuck.

You can change this with the 'synmaxcol' option.  The default is 3000.

--
login: yes
password: I don't know, please tell me
password is incorrect
login: yes
password: incorrect

 /// 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   ///