Skip to content

Commit

Permalink
Added date/time format codes to string formatting highlight
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea Riciputi committed Jul 23, 2015
1 parent 10d2c07 commit 8b43134
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions syntax/python.vim
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,11 @@ syn match pythonRawEscape +\\['"]+ display transparent contained
if s:Enabled("g:python_highlight_string_formatting")
" % operator string formatting
if s:Python2Syntax()
syn match pythonStrFormatting "%\%(([^)]\+)\)\=[-#0 +]*\d*\%(\.\d\+\)\=[hlL]\=[diouxXeEfFgGcrs%]" contained containedin=pythonString,pythonUniString,pythonUniRawString,pythonRawString
syn match pythonStrFormatting "%[-#0 +]*\%(\*\|\d\+\)\=\%(\.\%(\*\|\d\+\)\)\=[hlL]\=[diouxXeEfFgGcrs%]" contained containedin=pythonString,pythonUniString,pythonUniRawString,pythonRawString
syn match pythonStrFormatting "%\%(([^)]\+)\)\=[-#0 +]*\d*\%(\.\d\+\)\=[hlL]\=[diouxXeEfFgGcrs%aAwbBmyYHIpMSzZjUWc]" contained containedin=pythonString,pythonUniString,pythonUniRawString,pythonRawString
syn match pythonStrFormatting "%[-#0 +]*\%(\*\|\d\+\)\=\%(\.\%(\*\|\d\+\)\)\=[hlL]\=[diouxXeEfFgGcrs%aAwbBmyYHIpMSzZjUWc]" contained containedin=pythonString,pythonUniString,pythonUniRawString,pythonRawString
else
syn match pythonStrFormatting "%\%(([^)]\+)\)\=[-#0 +]*\d*\%(\.\d\+\)\=[hlL]\=[diouxXeEfFgGcrs%]" contained containedin=pythonString,pythonRawString
syn match pythonStrFormatting "%[-#0 +]*\%(\*\|\d\+\)\=\%(\.\%(\*\|\d\+\)\)\=[hlL]\=[diouxXeEfFgGcrs%]" contained containedin=pythonString,pythonRawString
syn match pythonStrFormatting "%\%(([^)]\+)\)\=[-#0 +]*\d*\%(\.\d\+\)\=[hlL]\=[diouxXeEfFgGcrs%aAwbBmyYHIpMSzZjUWc]" contained containedin=pythonString,pythonRawString
syn match pythonStrFormatting "%[-#0 +]*\%(\*\|\d\+\)\=\%(\.\%(\*\|\d\+\)\)\=[hlL]\=[diouxXeEfFgGcrs%aAwbBmyYHIpMSzZjUWc]" contained containedin=pythonString,pythonRawString
endif
endif

Expand Down

0 comments on commit 8b43134

Please sign in to comment.