Open adigitoleo opened 11 months ago
Ah, the match still isn't great, and will pick up the second f in:
msg = f"using mode f"
My vimL syn-pattern knowledge is not good enough to solve this (tried a few things including making it into a region that ends in '[^"]+"'
but no luck). Maybe someone would know how to fix it otherwise I guess it's not really suitable for addition.
The single-letter prefixes in Python3 are a bit nuts, and get lost in the code. I played aroung a bit and found that I can add a
pythonStringModifier
group to catch these (and highlight them in a strong color, likeOperator
).The solution requires defining said group as
contained
and adding that group to thecontains
list for all of the various string groups defined in the syntax file. Here's a snippet forafter/syntax/python.vim
that doesn't cover python 2 or multi-letter cases likefr"
. Maybe such an approach could be added in a more complete way to support this, if there is interest.