runtime(toml): update syntax script and fix highlight of dates and escapes
Commit:
https://github.com/vim/vim/commit/c6f6f1602dcd63d0e175f826b12bbe58be878d58
Author: Martin Tournoij <[email protected]>
Date: Tue Mar 10 20:02:05 2026 +0000
runtime(toml): update syntax script and fix highlight of dates and escapes
From upstream:
https://github.com/cespare/vim-toml/pull/69
https://github.com/cespare/vim-toml/pull/70
closes: #19591
Signed-off-by: Martin Tournoij <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/runtime/syntax/toml.vim b/runtime/syntax/toml.vim
index 961e03340..c91c1c3ba 100644
--- a/runtime/syntax/toml.vim
+++ b/runtime/syntax/toml.vim
@@ -3,13 +3,14 @@
" Homepage: https://github.com/cespare/vim-toml
" Maintainer: Aman Verma
" Previous Maintainer: Caleb Spare <[email protected]>
-" Last Change: May 5, 2025
+" Last Change: Mar 10, 2026
if exists('b:current_syntax')
finish
endif
-syn match tomlEscape /\[btnfr"/\]/ display contained
+syn match tomlEscape /\[betnfr"/\]/ display contained
+syn match tomlEscape /\x\x\{2}/ contained
syn match tomlEscape /\u\x\{4}/ contained
syn match tomlEscape /\U\x\{8}/ contained
syn match tomlLineEscape /\$/ contained
@@ -37,8 +38,8 @@ syn match tomlBoolean /\<\%(true\|false\)\>/ display
" https://tools.ietf.org/html/rfc3339
syn match tomlDate /\d\{4\}-\d\{2\}-\d\{2\}/ display
-syn match tomlDate /\d\{2\}:\d\{2\}:\d\{2\}\%(\.\d\+\)\?/ display
-syn match tomlDate /\d\{4\}-\d\{2\}-\d\{2\}[T
]\d\{2\}:\d\{2\}:\d\{2\}\%(\.\d\+\)\?\%(Z\|[+-]\d\{2\}:\d\{2\}\)\?/ display
+syn match tomlDate /\d\{2\}:\d\{2\}\%(:\d\{2\}\%(\.\d\+\)\?\)\?/ display
+syn match tomlDate /\d\{4\}-\d\{2\}-\d\{2\}[Tt
]\d\{2\}:\d\{2\}\%(:\d\{2\}\%(\.\d\+\)\?\)\?\%([Zz]\|[+-]\d\{2\}:\d\{2\}\)\?/
display
syn match tomlDotInKey / [^.]+\zs\./ contained display
syn match tomlKey / (^|[{,])\s*\zs[[:alnum:]._-]+\ze\s*\=/
contains=tomlDotInKey display
--
--
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/E1w03Tr-00GY3U-O8%40256bit.org.