diff --git a/syntax/python.vim b/syntax/python.vim index 0b4697c..1f6ed50 100644 --- a/syntax/python.vim +++ b/syntax/python.vim @@ -72,7 +72,7 @@ syn keyword pythonRepeat for while syn keyword pythonConditional if elif else syn keyword pythonException try except finally syn keyword pythonOperator and in is not or -syn match pythonStatement '\s*\([.,]\)\@' +syn match pythonStatement '\s*[.,]\@' " The standard pyrex.vim unconditionally removes the pythonInclude group, so " we provide a dummy group here to avoid crashing pyrex.vim. syn keyword pythonInclude import @@ -232,8 +232,8 @@ if s:Python2Syntax() syn region pythonUniRawString start=+[uU][rR]"""+ end=+"""+ keepend contains=pythonUniRawEscape,pythonUniRawEscapeError,pythonDocTest2,pythonSpaceError,@Spell syn region pythonUniRawString start=+[uU][rR]'''+ end=+'''+ keepend contains=pythonUniRawEscape,pythonUniRawEscapeError,pythonDocTest,pythonSpaceError,@Spell - syn match pythonUniRawEscape '\([^\\]\(\\\\\)*\)\@<=\\u\x\{4}' display contained - syn match pythonUniRawEscapeError '\([^\\]\(\\\\\)*\)\@<=\\u\x\{,3}\X' display contained + syn match pythonUniRawEscape '\%([^\\]\%(\\\\\)*\)\@<=\\u\x\{4}' display contained + syn match pythonUniRawEscapeError '\%([^\\]\%(\\\\\)*\)\@<=\\u\x\{,3}\X' display contained endif " Python 2/3 raw strings @@ -358,7 +358,7 @@ if s:Enabled('g:python_highlight_builtin_objs') syn keyword pythonNone None syn keyword pythonBoolean True False syn keyword pythonBuiltinObj Ellipsis NotImplemented - syn match pythonBuiltinObj '\v\.@' nextgroup=FunctionParameters + syn match pythonBuiltinObj '\v\.@' nextgroup=FunctionParameters syn keyword pythonBuiltinObj __debug__ __doc__ __file__ __name__ __package__ syn keyword pythonBuiltinObj __loader__ __spec__ __path__ __cached__ endif @@ -369,27 +369,27 @@ endif if s:Enabled('g:python_highlight_builtin_funcs') if s:Python2Syntax() - syn match pythonBuiltinFunc '\v\.@\ze\(' nextgroup=FunctionParameters - syn match pythonBuiltinFunc '\v\.@\ze\(' nextgroup=FunctionParameters - syn match pythonBuiltinFunc '\v\.@\ze\(' nextgroup=FunctionParameters + syn match pythonBuiltinFunc '\v\.@\ze\(' nextgroup=FunctionParameters + syn match pythonBuiltinFunc '\v\.@\ze\(' nextgroup=FunctionParameters + syn match pythonBuiltinFunc '\v\.@\ze\(' nextgroup=FunctionParameters if s:Enabled('g:python_print_as_function') - syn match pythonBuiltinFunc '\v\.@\ze\(' nextgroup=FunctionParameters + syn match pythonBuiltinFunc '\v\.@\ze\(' nextgroup=FunctionParameters endif else - syn match pythonBuiltinFunc '\v\.@\ze\(' nextgroup=FunctionParameters + syn match pythonBuiltinFunc '\v\.@\ze\(' nextgroup=FunctionParameters endif - syn match pythonBuiltinFunc '\v\.@\ze\(' nextgroup=FunctionParameters - syn match pythonBuiltinFunc '\v\.@\ze\(' nextgroup=FunctionParameters - syn match pythonBuiltinFunc '\v\.@\ze\(' nextgroup=FunctionParameters - syn match pythonBuiltinFunc '\v\.@\ze\(' nextgroup=FunctionParameters - syn match pythonBuiltinFunc '\v\.@\ze\(' nextgroup=FunctionParameters - syn match pythonBuiltinFunc '\v\.@\ze\(' nextgroup=FunctionParameters - syn match pythonBuiltinFunc '\v\.@\ze\(' nextgroup=FunctionParameters - syn match pythonBuiltinFunc '\v\.@\ze\(' nextgroup=FunctionParameters - syn match pythonBuiltinFunc '\v\.@\ze\(' nextgroup=FunctionParameters - syn match pythonBuiltinFunc '\v\.@\ze\(' nextgroup=FunctionParameters - syn match pythonBuiltinFunc '\v\.@\ze\(' nextgroup=FunctionParameters - syn match pythonBuiltinFunc '\v\.@\ze\(' nextgroup=FunctionParameters + syn match pythonBuiltinFunc '\v\.@\ze\(' nextgroup=FunctionParameters + syn match pythonBuiltinFunc '\v\.@\ze\(' nextgroup=FunctionParameters + syn match pythonBuiltinFunc '\v\.@\ze\(' nextgroup=FunctionParameters + syn match pythonBuiltinFunc '\v\.@\ze\(' nextgroup=FunctionParameters + syn match pythonBuiltinFunc '\v\.@\ze\(' nextgroup=FunctionParameters + syn match pythonBuiltinFunc '\v\.@\ze\(' nextgroup=FunctionParameters + syn match pythonBuiltinFunc '\v\.@\ze\(' nextgroup=FunctionParameters + syn match pythonBuiltinFunc '\v\.@\ze\(' nextgroup=FunctionParameters + syn match pythonBuiltinFunc '\v\.@\ze\(' nextgroup=FunctionParameters + syn match pythonBuiltinFunc '\v\.@\ze\(' nextgroup=FunctionParameters + syn match pythonBuiltinFunc '\v\.@\ze\(' nextgroup=FunctionParameters + syn match pythonBuiltinFunc '\v\.@\ze\(' nextgroup=FunctionParameters endif " @@ -398,36 +398,36 @@ endif if s:Enabled('g:python_highlight_exceptions') if s:Python2Syntax() - syn match pythonExClass '\v\.@' nextgroup=FunctionParameters + syn match pythonExClass '\v\.@' nextgroup=FunctionParameters else - syn match pythonExClass '\v\.@' nextgroup=FunctionParameters - syn match pythonExClass '\v\.@' nextgroup=FunctionParameters - syn match pythonExClass '\v\.@' nextgroup=FunctionParameters - syn match pythonExClass '\v\.@' nextgroup=FunctionParameters - syn match pythonExClass '\v\.@' nextgroup=FunctionParameters - syn match pythonExClass '\v\.@' nextgroup=FunctionParameters - syn match pythonExClass '\v\.@' nextgroup=FunctionParameters - syn match pythonExClass '\v\.@' nextgroup=FunctionParameters + syn match pythonExClass '\v\.@' nextgroup=FunctionParameters + syn match pythonExClass '\v\.@' nextgroup=FunctionParameters + syn match pythonExClass '\v\.@' nextgroup=FunctionParameters + syn match pythonExClass '\v\.@' nextgroup=FunctionParameters + syn match pythonExClass '\v\.@' nextgroup=FunctionParameters + syn match pythonExClass '\v\.@' nextgroup=FunctionParameters + syn match pythonExClass '\v\.@' nextgroup=FunctionParameters + syn match pythonExClass '\v\.@' nextgroup=FunctionParameters endif - syn match pythonExClass '\v\.@' nextgroup=FunctionParameters - syn match pythonExClass '\v\.@' nextgroup=FunctionParameters - syn match pythonExClass '\v\.@' nextgroup=FunctionParameters - syn match pythonExClass '\v\.@' nextgroup=FunctionParameters - syn match pythonExClass '\v\.@' nextgroup=FunctionParameters - syn match pythonExClass '\v\.@' nextgroup=FunctionParameters - syn match pythonExClass '\v\.@' nextgroup=FunctionParameters - syn match pythonExClass '\v\.@' nextgroup=FunctionParameters - syn match pythonExClass '\v\.@' nextgroup=FunctionParameters - syn match pythonExClass '\v\.@' nextgroup=FunctionParameters - syn match pythonExClass '\v\.@' nextgroup=FunctionParameters - syn match pythonExClass '\v\.@' nextgroup=FunctionParameters - syn match pythonExClass '\v\.@' nextgroup=FunctionParameters - syn match pythonExClass '\v\.@' nextgroup=FunctionParameters - syn match pythonExClass '\v\.@' nextgroup=FunctionParameters - syn match pythonExClass '\v\.@' nextgroup=FunctionParameters - syn match pythonExClass '\v\.@' nextgroup=FunctionParameters - syn match pythonExClass '\v\.@' nextgroup=FunctionParameters + syn match pythonExClass '\v\.@' nextgroup=FunctionParameters + syn match pythonExClass '\v\.@' nextgroup=FunctionParameters + syn match pythonExClass '\v\.@' nextgroup=FunctionParameters + syn match pythonExClass '\v\.@' nextgroup=FunctionParameters + syn match pythonExClass '\v\.@' nextgroup=FunctionParameters + syn match pythonExClass '\v\.@' nextgroup=FunctionParameters + syn match pythonExClass '\v\.@' nextgroup=FunctionParameters + syn match pythonExClass '\v\.@' nextgroup=FunctionParameters + syn match pythonExClass '\v\.@' nextgroup=FunctionParameters + syn match pythonExClass '\v\.@' nextgroup=FunctionParameters + syn match pythonExClass '\v\.@' nextgroup=FunctionParameters + syn match pythonExClass '\v\.@' nextgroup=FunctionParameters + syn match pythonExClass '\v\.@' nextgroup=FunctionParameters + syn match pythonExClass '\v\.@' nextgroup=FunctionParameters + syn match pythonExClass '\v\.@' nextgroup=FunctionParameters + syn match pythonExClass '\v\.@' nextgroup=FunctionParameters + syn match pythonExClass '\v\.@' nextgroup=FunctionParameters + syn match pythonExClass '\v\.@' nextgroup=FunctionParameters endif if s:Enabled('g:python_slow_sync')