vim-python / python-syntax

Python syntax highlighting for Vim
MIT License
438 stars 84 forks source link

yield is repeated two times and match whitespaces before yield #6

Closed monkoose closed 7 years ago

monkoose commented 7 years ago
syn keyword pythonStatement     pass yield

syn match pythonStatement       '\s*\([.,]\)\@<!\<yield\>'

With current state it is matching whitespaces before yield. Do not recognizable if you have simple color theme, but if you have underline or bg(for pythonStatement) different from Normal - it will be noticeble.

And with new update we have syn match pythonStetement '\s*[.,]\@<!\<yield\>' Why do we even need this syn match beside syn keyword? Describe please. If so i really think it should be something like this syn match pythonStatement '\(\s*[.,]\)\@<!\<yield\>' But i'm still not sure why do we need this.

nfnty commented 7 years ago

It was probably added because it was being highlighted for class methods.

It should be implemented for every keyword if we really want this feature.