With a python file like the following "this_is_not_a_string()" gets highlighted
as a string, when opening/reloading the file with the cursor at the end:
def foo():
a_multiline_string = """
[dozens of lines]
def inner_foo():
pass
[dozens of lines]"""
this_is_not_a_string()
This is caused by the following sync setup:
:syn sync
--- Syntax sync items ---
pythonSync xxx match /^\s*\%(def\|class\)\s\+\h\w*\s*(/ grouphere NONE
Spell cluster=NONE
NoSpell cluster=NONE
I've tried adding the following to it, but regions in this context do not
(appear to) work across multiple lines (":h :syn-sync-fourth" mentions this):
syn sync region pythonSyncStrings start=+"""+ end=+"""+
Is there a way to improve / fix this?
Or is there only the workaround of using ":syntax sync fromstart" with files
like this?
Regards,
Daniel.
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.