[Haskell-cafe] lhs syntax highlighting in vim

Ian Lynagh igloo at earth.li
Wed Jun 11 06:29:35 EDT 2008


On Wed, Jun 11, 2008 at 01:23:58AM +0100, Eric Stansifer wrote:
> 
> The syntax highlighting file for literate haskell in vim says that its
> maintainer is haskell-cafe at haskell.org, so hopefully one of you will
> find this relevant.
> 
> In literate haskell files, vim optionally highlights the non-code text
> according to TeX markup.  The syntax highlighting file looks for key
> phrases (e.g., "\documentclass") to decide whether to use TeX markup
> highlighting;  but it (erroneously, in my opinion, and at variance
> with the documentation) will use TeX markup highlighting on any lhs
> file that contains the '%' character anywhere in it.  The bug is in
> line 74 of version 1.01 of the lhaskell.vim syntax highlighting file.

I agree that this is wrong. It used to only look at the first 20 lines,
so we were covering the case where a TeX file began with some TeX
comments. We'd also look for ^\s*%, rather than a % anywhere. If we are
going to look at the whole file then checking for comments isn't
necessary.


Thanks
Ian



More information about the Haskell-Cafe mailing list