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

Ilya Tsindlekht eilya497 at 013.net
Tue Jun 5 05:30:46 EDT 2007

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)

More information about the Haskell-Cafe mailing list