runtime(python): Highlight f-strings in Python
Commit:
https://github.com/vim/vim/commit/b7fc24d3a3d21ccf1461c703eb7ff07ef3994c54
Author: Rob B <[email protected]>
Date: Thu Jul 17 21:22:40 2025 +0200
runtime(python): Highlight f-strings in Python
fixes: https://github.com/vim/vim/issues/10734
fixes: https://github.com/vim/vim/issues/14033
closes: #17767
Signed-off-by: Rob B <[email protected]>
Signed-off-by: Zvezdan Petkovic <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/runtime/syntax/python.vim b/runtime/syntax/python.vim
index 759af2d4f..012f11140 100644
--- a/runtime/syntax/python.vim
+++ b/runtime/syntax/python.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Python
" Maintainer: Zvezdan Petkovic <[email protected]>
-" Last Change: 2025 Jul 14
+" Last Change: 2025 Jul 17
" Credits: Neil Schemenauer <[email protected]>
" Dmitry Vasiliev
" Rob B
@@ -156,6 +156,33 @@ syn region pythonRawString matchgroup=pythonTripleQuotes
\ start=+[rR]\z('''\|"""\)+ end="\z1" keepend
\ contains=pythonSpaceError,pythonDoctest,@Spell
+" Formatted string literals (f-strings)
+" https://docs.python.org/3/reference/lexical_analysis.html#f-strings
+syn region pythonFString
+ \ matchgroup=pythonQuotes
+ \ start=+
--
--
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].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1ucUIw-00Big9-1p%40256bit.org.