comparison runtime/syntax/python.vim @ 29533:34c1f4cd0c18

Update runtime files Commit: https://github.com/vim/vim/commit/2ecbe53f452e92e941aff623f6a0b72f80e43d07 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jul 29 21:36:21 2022 +0100 Update runtime files
author Bram Moolenaar <Bram@vim.org>
date Fri, 29 Jul 2022 22:45:04 +0200
parents 3a63b1e4a6f4
children b2412874362f
comparison
equal deleted inserted replaced
29532:9ab2caa93280 29533:34c1f4cd0c18
1 " Vim syntax file 1 " Vim syntax file
2 " Language: Python 2 " Language: Python
3 " Maintainer: Zvezdan Petkovic <zpetkovic@acm.org> 3 " Maintainer: Zvezdan Petkovic <zpetkovic@acm.org>
4 " Last Change: 2021 Dec 10 4 " Last Change: 2022 Jun 28
5 " Credits: Neil Schemenauer <nas@python.ca> 5 " Credits: Neil Schemenauer <nas@python.ca>
6 " Dmitry Vasiliev 6 " Dmitry Vasiliev
7 " 7 "
8 " This version is a major rewrite by Zvezdan Petkovic. 8 " This version is a major rewrite by Zvezdan Petkovic.
9 " 9 "
82 syn keyword pythonStatement False None True 82 syn keyword pythonStatement False None True
83 syn keyword pythonStatement as assert break continue del global 83 syn keyword pythonStatement as assert break continue del global
84 syn keyword pythonStatement lambda nonlocal pass return with yield 84 syn keyword pythonStatement lambda nonlocal pass return with yield
85 syn keyword pythonStatement class def nextgroup=pythonFunction skipwhite 85 syn keyword pythonStatement class def nextgroup=pythonFunction skipwhite
86 syn keyword pythonConditional elif else if 86 syn keyword pythonConditional elif else if
87 syn keyword pythonConditional case match
88 syn keyword pythonRepeat for while 87 syn keyword pythonRepeat for while
89 syn keyword pythonOperator and in is not or 88 syn keyword pythonOperator and in is not or
90 syn keyword pythonException except finally raise try 89 syn keyword pythonException except finally raise try
91 syn keyword pythonInclude from import 90 syn keyword pythonInclude from import
92 syn keyword pythonAsync async await 91 syn keyword pythonAsync async await
92
93 " Soft keywords
94 " These keywords do not mean anything unless used in the right context
95 " See https://docs.python.org/3/reference/lexical_analysis.html#soft-keywords
96 " for more on this.
97 syn match pythonConditional "^\s*\zscase\%(\s\+.*:.*$\)\@="
98 syn match pythonConditional "^\s*\zsmatch\%(\s\+.*:\s*\%(#.*\)\=$\)\@="
93 99
94 " Decorators 100 " Decorators
95 " A dot must be allowed because of @MyClass.myfunc decorators. 101 " A dot must be allowed because of @MyClass.myfunc decorators.
96 syn match pythonDecorator "@" display contained 102 syn match pythonDecorator "@" display contained
97 syn match pythonDecoratorName "@\s*\h\%(\w\|\.\)*" display contains=pythonDecorator 103 syn match pythonDecoratorName "@\s*\h\%(\w\|\.\)*" display contains=pythonDecorator