Vim + literal Haskell + dollar symbols

Hi cafe,
The lhaskell edit mode for lhs2tex documents in vim gets confused when a
dollar is used in code.
This also makes the spellchecker ignore text paragraphs (until a matching $
is found).
Where should this be reported?
This list is named as maintainer in the Ubuntu package vim-runtime's
lhaskell.vim syntax file:
" Maintainer: Haskell Cafe mailinglist

Hi, Ivan! Does this problem occur with code environments or only with spec environments? At least Vim 7.4 does not mention spec in syntax/lhaskell. vim. I have patched this file such that it does all the things with spec that it does with code, and it works just fine. The patch is as follows:
78c78 < if search('\\documentclass\|\\begin{\(code}\)\@!\|\\\(sub\)*section\|\\chapter|\\part','W') != 0 ---
if search('\\documentclass\|\\begin{\(code}\)\@!\|\\begin{\(spec}\)\@!\|\\\(sub\)*section\|\\chapter|\\part','W') != 0 110a111 syntax region lhsHaskellBeginEndBlock start="^\\begin{spec}\s*$" matchgroup=NONE end="\%(^\\end{spec}.*$\)\@=" contains=@haskellTop,beginCodeBegin containedin=@lhsTeXContainer All the best, Wolfgang Am Sonntag, den 18.03.2018, 01:39 -0400 schrieb Ivan Perez: Hi cafe,
The lhaskell edit mode for lhs2tex documents in vim gets confused when a dollar is used in code.
This also makes the spellchecker ignore text paragraphs (until a matching $ is found).
Where should this be reported?
This list is named as maintainer in the Ubuntu package vim-runtime's lhaskell.vim syntax file:
" Maintainer: Haskell Cafe mailinglist .org> " Original Author: Arthur van Leeuwen
" Last Change: 2010 Apr 11 " Version: 1.04 Cheers
Ivan _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

Hi Wolfgang,
Thanks.
That change does help, but it still gets confused.
Screenshot: https://ibb.co/jD6mPc
Could that change be made permanent though? Could it be added to vim's
default lhaskell.vim?
Cheers
Ivan
On 19 March 2018 at 05:47, Wolfgang Jeltsch
Hi, Ivan!
Does this problem occur with code environments or only with spec environments? At least Vim 7.4 does not mention spec in syntax/lhaskell.vim. I have patched this file such that it does all the things with spec that it does with code, and it works just fine. The patch is as follows:
78c78
< if search('\\documentclass\|\\begin{\(code}\)\@!\|\\\(sub\)*section\|\\chapter|\\part','W') != 0
---
if search('\\documentclass\|\\begin{\(code}\)\@!\|\\begin{\(spec}\)\@!\|\\\(sub\)*section\|\\chapter|\\part','W') != 0
110a111
syntax region lhsHaskellBeginEndBlock start="^\\begin{spec}\s*$" matchgroup=NONE end="\%(^\\end{spec}.*$\)\@=" contains=@haskellTop,beginCodeBegin containedin=@lhsTeXContainer
All the best, Wolfgang
Am Sonntag, den 18.03.2018, 01:39 -0400 schrieb Ivan Perez:
Hi cafe,
The lhaskell edit mode for lhs2tex documents in vim gets confused when a dollar is used in code.
This also makes the spellchecker ignore text paragraphs (until a matching $ is found).
Where should this be reported?
This list is named as maintainer in the Ubuntu package vim-runtime's lhaskell.vim syntax file:
" Maintainer: Haskell Cafe mailinglist
" Original Author: Arthur van Leeuwen
" Last Change: 2010 Apr 11 " Version: 1.04 Cheers
Ivan
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to:http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

Hi, Ivan! Unfortunately, I cannot reproduce your problem. With my Vim configuration, I get this: https://ibb.co/e6RLKc. Interestingly, the syntax hightlighting I get generally looks quite different from the one you get. I don’t know how to get a change into Vim’s default syntax/lhaskell.vim. Also, my patch might not be optimal (it almost duplicates some code). All the best, Wolfgang Am Montag, den 19.03.2018, 07:09 -0400 schrieb Ivan Perez:
Hi Wolfgang,
Thanks.
That change does help, but it still gets confused.
Screenshot: https://ibb.co/jD6mPc
Could that change be made permanent though? Could it be added to vim's default lhaskell.vim?
Cheers
Ivan
On 19 March 2018 at 05:47, Wolfgang Jeltsch
wrote: Hi, Ivan!
Does this problem occur with code environments or only with spec environments? At least Vim 7.4 does not mention spec in syntax/lhaskell.vim. I have patched this file such that it does all the things with spec that it does with code, and it works just fine. The patch is as follows:
78c78 < if search('\\documentclass\|\\begin{\(code}\)\@!\|\\\(sub\)*section\| \\chapter|\\part','W') != 0 ---
if search('\\documentclass\|\\begin{\(code}\)\@!\|\\begin{\(spec}\)\@ !\|\\\(sub\)*section\|\\chapter|\\part','W') != 0 110a111 syntax region lhsHaskellBeginEndBlock start="^\\begin{spec}\s*$" matchgroup=NONE end="\%(^\\end{spec}.*$\)\@=" contains=@haskellTop ,beginCodeBegin containedin=@lhsTeXContainer All the best, Wolfgang
Am Sonntag, den 18.03.2018, 01:39 -0400 schrieb Ivan Perez:
Hi cafe,
The lhaskell edit mode for lhs2tex documents in vim gets confused when a dollar is used in code.
This also makes the spellchecker ignore text paragraphs (until a matching $ is found).
Where should this be reported?
This list is named as maintainer in the Ubuntu package vim- runtime's lhaskell.vim syntax file:
" Maintainer: Haskell Cafe mailinglist kell.org> " Original Author: Arthur van Leeuwen
" Last Change: 2010 Apr 11 " Version: 1.04 Cheers
Ivan _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
participants (2)
-
Ivan Perez
-
Wolfgang Jeltsch