gvim long multiline string highlighting

Viewed 1246

I make extensive use of multiline docstrings in my python source code to include doctests. Unfortunately, vim/gvim seems to have a hard time with syntax highlighting, occasionally losing it's place and forgetting that it's in the middle of a string literal, and the highlighting "flips" from string to source and source to string.

I can scroll up to the top and back down again, and vim usually fixes the problem, but sometimes it takes a few tries.

Aside from making my docstrings shorter, Is there a way to help vim keep the highlighting on these long literals in order?

2 Answers
Related