|
@@ -13,7 +13,7 @@
|
13
|
13
|
" Thanks:
|
14
|
14
|
"
|
15
|
15
|
" Jeroen Ruigrok van der Werven
|
16
|
|
-" for the idea of highlighting for erroneous operators
|
|
16
|
+" for the idea to highlight erroneous operators
|
17
|
17
|
" Pedro Algarvio
|
18
|
18
|
" for the patch to enable spell checking only for the right spots
|
19
|
19
|
" (strings and comments)
|
|
@@ -37,6 +37,9 @@
|
37
|
37
|
" For highlight string formatting:
|
38
|
38
|
" python_highlight_string_formatting
|
39
|
39
|
"
|
|
40
|
+" For highlight string.Template templates:
|
|
41
|
+" python_highlight_string_templates
|
|
42
|
+"
|
40
|
43
|
" For highlight indentation errors:
|
41
|
44
|
" python_highlight_indent_errors
|
42
|
45
|
"
|
|
@@ -75,6 +78,9 @@ if exists("python_highlight_all") && python_highlight_all != 0
|
75
|
78
|
if !exists("python_highlight_string_formatting")
|
76
|
79
|
let python_highlight_string_formatting = 1
|
77
|
80
|
endif
|
|
81
|
+ if !exists("python_highlight_string_templates")
|
|
82
|
+ let python_highlight_string_templates = 1
|
|
83
|
+ endif
|
78
|
84
|
if !exists("python_highlight_indent_errors")
|
79
|
85
|
let python_highlight_indent_errors = 1
|
80
|
86
|
endif
|
|
@@ -180,6 +186,11 @@ if exists("python_highlight_string_formatting") && python_highlight_string_forma
|
180
|
186
|
syn match pythonStrFormat "%[-#0 +]*\(\*\|\d\+\)\=\(\.\(\*\|\d\+\)\)\=[hlL]\=[diouxXeEfFgGcrs%]" contained containedin=pythonString,pythonUniString,pythonRawString,pythonUniRawString
|
181
|
187
|
endif
|
182
|
188
|
|
|
189
|
+if exists("python_highlight_string_templates") && python_highlight_string_templates != 0
|
|
190
|
+ " String templates
|
|
191
|
+ syn match pythonStrTemplate "\$\(\$\|{[^}]*}\|[a-zA-Z_][a-zA-Z0-9_]*\)" contained containedin=pythonString,pythonUniString,pythonRawString,pythonUniRawString
|
|
192
|
+endif
|
|
193
|
+
|
183
|
194
|
if exists("python_highlight_doctests") && python_highlight_doctests != 0
|
184
|
195
|
" DocTests
|
185
|
196
|
syn region pythonDocTest start="^\s*>>>" end=+'''+he=s-1 end="^\s*$" contained
|
|
@@ -301,6 +312,7 @@ if version >= 508 || !exists("did_python_syn_inits")
|
301
|
312
|
HiLink pythonUniRawEscapeError Error
|
302
|
313
|
|
303
|
314
|
HiLink pythonStrFormat Special
|
|
315
|
+ HiLink pythonStrTemplate Special
|
304
|
316
|
|
305
|
317
|
HiLink pythonDocTest Special
|
306
|
318
|
HiLink pythonDocTest2 Special
|