[Haskell-cafe] OK, so this VIM thing -- how do I make it actually work?

Rodrigo Queiro overdrigzed at gmail.com
Tue Jun 5 05:41:44 EDT 2007


To back him up, it seems that the lhaskell.vim syntax highlighter is broken
with Vim 7.1. Here, it is definitely using lhaskell.vim, but doesn't seem to
be parsing the code in between \begin{code} and \end{code} as Haskell.

I can't work out why though, it seems that the addition of \@= to the end
pattern of the code region is causing it to not be recognised, but removing
it causes other problems.

Adding the keepend option makes it work nicely for the first block, but fail
to highlight later blocks.

On 05/06/07, Ilya Tsindlekht <eilya497 at 013.net> wrote:
>
> On Tue, Jun 05, 2007 at 04:58:40PM +0800, Michael T. Richter wrote:
> > I've given up on getting a decent text editor for editing Haskell
> > (specifically literate Haskell -- plain Haskell works fine in GEDIT).
> > Instead I fire up VIM and get ... a total mess.  At first I think maybe
> > I've screwed up a whole bunch of settings or something, so I nuke
> > everything in my home directory that begins with .vim and then, for
> > added measure, head over to /usr/share and nuke the entire ./vim
> > directory tree.  I then reinstall vim (from the Ubuntu Edgy archives) to
> > get a brand new set of config files unsullied by my hands.
> >
> > I still get a dog's breakfast.
> >
> > A screen shot of what I'm seeing with a representative example of a .lhs
> > file to show what I mean can be found at
> > http://img357.imageshack.us/img357/5798/gvimexamplezv4.png.  (I've pared
> > it down to the minimum I could find that shows the behaviour clearly.)
> > The problems I'm seeing are the ugly white-on-red for underlines, the
> > lack of any kind of differentiation for keywords/operators/etc. vs.
> > identifiers (although some punctuation is recognized, specifically curly
> > braces), comments not being noted, etc.  Basically it looks like the
> > Haskell is simply not being recognized at all (and, if the @saBinds@
> > thing is what I think it is, it looks like some latex isn't being
> > recognized fully either).
> >
> > Can anybody vim-centric please take a look at this and give me a few
> > educated guesses as to what is happening here?  For good measure, here's
> > the beginning of the lhaskell.vim file that comes with my vim
> > distribution (7.0 in the Ubuntu archives).  If it's desired I can attach
> > the whole file.  (It isn't actually all that large.)
> It seems to me like VIM thinks your file is a (La)TeX file. Can you
> check that your filetype variable is set to lhaskell? (Type :set filetype)
> It should be if your file has extension .lhs. If it isn't, try setting it
> manually (:set filetype=lhaskell)
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20070605/e1898dfc/attachment.htm


More information about the Haskell-Cafe mailing list