You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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, like Operator).
The solution requires defining said group as contained and adding that group to the contains list for all of the various string groups defined in the syntax file. Here's a snippet for after/syntax/python.vim that doesn't cover python 2 or multi-letter cases like fr". Maybe such an approach could be added in a more complete way to support this, if there is interest.
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.The text was updated successfully, but these errors were encountered: