#28093 closed defect (worksforme)
vim @7.3.102_0 LaTeX Error
Reported by: | smokejumperit@… | Owned by: | raimue (Rainer Müller) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.9.2 |
Keywords: | vim, latex | Cc: | |
Port: | vim |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
Ever since upgrading, when I create a file which ends with ".tex" and contains only the line "\documentclass{article}" (or any LaTeX file beginning with that line), and then open it with vim, I get a screen full of errors like:
E10: \ should be followed by /, ?, or &
That screen of errors goes away quickly, and then everything works fine.
Change History (5)
comment:1 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|---|
Owner: | changed from macports-tickets@… to raimue@… |
comment:2 Changed 14 years ago by raimue (Rainer Müller)
Status: | new → assigned |
---|
comment:3 Changed 14 years ago by smokejumperit@…
Using your tip, I tracked it down to "syntax enable" in ~/.exrc. That's not a surprise, given the behavior.
To my knowledge, I never installed syntax highlighting for LaTeX---it just shipped with vi. That's why I opened a ticket for MacPorts. Where/how would I find the syntax highlighting script that might be causing the problem?
comment:4 Changed 14 years ago by raimue (Rainer Müller)
Resolution: | → worksforme |
---|---|
Status: | assigned → closed |
If you are using ~/.exrc it is very likely that vim is running in compatible
mode, emulating the classic vi. Check for this using :set compatible?
. If it says 'compatible', the script syntax is limited and does not support line continuation using '\' which the syntax file in question probably uses. Try adding a set nocompatible
at the beginning of your .exrc or even switch to .vimrc which would set this automatically.
comment:5 Changed 14 years ago by smokejumperit@…
Alright, I'm embarrassed to say that fixed it. Thanks for the tip.
Robert.
I can't reproduce this. I suppose you have some plugin which tries to parse the tex file and can't handle that.
Does it still happen without plugins and .vimrc disabled?