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

Arthur van Leeuwen arthurvl at cs.uu.nl
Fri Jun 8 03:54:32 EDT 2007

On 5-jun-2007, at 10:58, 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?

Yes, I can. What you see happening is that the syntax highlighter  
doesn't get
completely switched from TeX mode to Haskell mode on the change marked
by \begin{code} (and back again on \end{code}). Therefore, lone  
(which are usually in error in TeX outside of mathematics) are marked  
as errors.
This should be fixed. I'll look into it. The reason I've never run  
into it is simple:
I tend not to use underscores in my Haskell code. :)

With regards, Arthur van Leeuwen.


   /\    / |       arthurvl at cs.uu.nl       | Work like you don't need  
the money
/__\  /  | A friend is someone with whom | Love like you have never  
been hurt
/    \/__ | you can dare to be yourself   | Dance like there's nobody  

More information about the Haskell-Cafe mailing list