Skip to content

Commit 0a24089

Browse files
author
Michael Doronin
committed
from highlighted in imports but not in yield from (not sure how this
works)
1 parent f3bd1e1 commit 0a24089

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

syntax/python.vim

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,12 @@ syn keyword pythonConditional if elif else
165165
" we provide a dummy group here to avoid crashing pyrex.vim.
166166
syn keyword pythonInclude import
167167
syn keyword pythonImport import
168-
syn match pythonImport "\(yield \)\@<!\<from\>"
168+
syn keyword pythonImport from
169169
syn keyword pythonException try except finally
170170
syn keyword pythonOperator and in is not or
171-
syn match pythonStatement "^\s*yield\>" display
171+
syn match pythonStatement "\s*\([.,]\)\@<!\<yield\>"
172172

173-
syn match pythonIdentifier "[a-zA-Z_][a-zA-Z0-9_]*" nextgroup=FunctionParameters display
173+
syn match pythonIdentifier "[a-zA-Z_][a-zA-Z0-9_]*" nextgroup=FunctionParameters
174174

175175
if s:Python2Syntax()
176176
if !s:Enabled("g:python_print_as_function")
@@ -180,12 +180,12 @@ if s:Python2Syntax()
180180
syn match pythonFunction "[a-zA-Z_][a-zA-Z0-9_]*" nextgroup=FunctionParameters display contained
181181
else
182182
syn keyword pythonStatement as nonlocal
183-
syn match pythonStatement "\v\s*<yield\s+from>" display
183+
syn match pythonStatement "\v\s*<yield\s+from>"
184184
syn match pythonStatement "\v(\.)@<!<await>"
185185
syn match pythonFunction "[a-zA-Z_][a-zA-Z0-9_]*" nextgroup=FunctionParameters display contained
186186
syn match pythonStatement "\<async\s\+def\>" nextgroup=pythonFunction skipwhite
187-
syn match pythonStatement "\<async\s\+with\>" display
188-
syn match pythonStatement "\<async\s\+for\>" display
187+
syn match pythonStatement "\<async\s\+with\>"
188+
syn match pythonStatement "\<async\s\+for\>"
189189
endif
190190

191191
syn region FunctionParameters start='(' end=')' display contains=

0 commit comments

Comments
 (0)