
Hi Michael,
I can also confirm this occurs on my Vim 7.0 (I'm also running Edgy Eft).
Notably it (the red highlight on _ and loss of syntax highlighting) only
seems to occur when there is a \section (or sub) command within the .lhs (I
am also using lhs2tex). Hadn't noticed this before as I tend not to place
sectioning commands in the .lhs and use a main .tex containing sequences
like:
\subsection{Module foo}
\include{foo}
Not sure if this is present in the Feisty Fawn binaries, I guess someone
should file a bug report? :)
Dave,
On 05/06/07, Michael T. Richter
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.)
" Vim syntax file " Language: Haskell with literate comments, Bird style, " TeX style and plain text surrounding " \begin{code} \end{code} blocks " Maintainer: Haskell Cafe mailinglist
" Original Author: Arthur van Leeuwen " Last Change: 2004 Aug 31 " Version: 1.01 " " Thanks to Ian Lynagh for thoughtful comments on initial versions and " for the inspiration for writing this in the first place. " " This style guesses as to the type of markup used in a literate haskell " file and will highlight (La)TeX markup if it finds any " This behaviour can be overridden, both glabally and locally using " the lhs_markup variable or b:lhs_markup variable respectively. " " lhs_markup must be set to either tex or none to indicate that " you always want (La)TeX highlighting or no highlighting " must not be set to let the highlighting be guessed " b:lhs_markup must be set to eiterh tex or none to indicate that " you want (La)TeX highlighting or no highlighting for " this particular buffer " must not be set to let the highlighting be guessed " " " 2004 February 18: New version, based on Ian Lynagh's TeX guessing " lhaskell.vim, cweb.vim, tex.vim, sh.vim and fortran.vim " 2004 February 20: Cleaned up the guessing and overriding a bit " 2004 February 23: Cleaned up syntax highlighting for \begin{code} and " \end{code}, added some clarification to the attributions " -- *Michael T. Richter*
(*GoogleTalk:* ttmrichter@gmail.com) *It's OK to figure out murder mysteries, but you shouldn't need to figure out code. You should be able to read it. (Steve McConnell)* _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe