bug: multi-line strings, folds, and syntax highlighting
- I have long been plagued by a bug in vim, and I finally got
around to compiling with the latest patches to see if the
problem is solved...and it isn't.
I use frequently use folds in VIM, usually one per function
when programming so I can very quickly traverse the file.
When I use multi-line strings within a fold, sometimes VIM
does not recognize that the string has ended and the syntax
color for strings continues down through the remainder of
the file. I have noted this behavior in both Python style
strings (that use """ ... """) and SQL strings (that
use ' ... ').
For an example, see the attached file, foo.py. Open the
file and enter the command:
And optionally (for clarity):
You will see a single level-1 fold which contains 3 level-2
folds. If you open the level-1 fold ("class Notebook(....."),
then open the second or third folds ("def AddPage..." and
"def CloseTab..."), you will see the problem I describe with
syntax highlighting and folds. Note that the last line of
the file ("#end class # }}}1" also displays the same
problem even before any of the second-level folds are