Commit: runtime(python): Highlight t-strings

0 views
Skip to first unread message

Christian Brabandt

unread,
3:30 PM (1 hour ago) 3:30 PM
to vim...@googlegroups.com
runtime(python): Highlight t-strings

Commit: https://github.com/vim/vim/commit/8d8c9074c3cbb33b2b8b97556bdb7267e2617b93
Author: Rob B <git...@0x7e.net>
Date: Wed Dec 3 20:25:41 2025 +0000

runtime(python): Highlight t-strings

- Highlight t-strings
- Update comments
- Add tests

closes: #18679

Signed-off-by: Rob B <git...@0x7e.net>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/syntax/python.vim b/runtime/syntax/python.vim
index 05c965ec6..301fb8480 100644
--- a/runtime/syntax/python.vim
+++ b/runtime/syntax/python.vim
@@ -3,6 +3,7 @@
" Maintainer: Zvezdan Petkovic <zpet...@acm.org>
" Last Change: 2025 Sep 08
" 2025 Sep 25 by Vim Project: fix wrong type highlighting #18394
+" 2025 Dec 03 by Vim Project: highlight t-strings #18679
" Credits: Neil Schemenauer <n...@python.ca>
" Dmitry Vasiliev
" Rob B
@@ -168,27 +169,29 @@ syn region pythonRawString matchgroup=pythonTripleQuotes

" Formatted string literals (f-strings)
" https://docs.python.org/3/reference/lexical_analysis.html#f-strings
+" Template string literals (t-strings)
+" https://docs.python.org/3/reference/lexical_analysis.html#template-string-literals
syn region pythonFString
\ matchgroup=pythonQuotes
- \ start=+
Reply all
Reply to author
Forward
0 new messages