forked from vim-python/python-syntax
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2cc00ba
commit 988efe9
Showing
2 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
diff --git a/syntax/python.vim b/syntax/python.vim | ||
index 2524aba..3d49f51 100644 | ||
--- a/syntax/python.vim | ||
+++ b/syntax/python.vim | ||
@@ -81,6 +81,7 @@ if s:Enabled('g:python_highlight_class_vars') | ||
endif | ||
syn keyword pythonRepeat for while | ||
syn keyword pythonConditional if elif else | ||
+syn keyword pythonMatch match case | ||
syn keyword pythonException try except finally | ||
" The standard pyrex.vim unconditionally removes the pythonInclude group, so | ||
" we provide a dummy group here to avoid crashing pyrex.vim. | ||
@@ -105,7 +106,7 @@ else | ||
syn match pythonStatement '\<async\s\+def\>' nextgroup=pythonFunction skipwhite | ||
syn match pythonStatement '\<async\s\+with\>' | ||
syn match pythonStatement '\<async\s\+for\>' | ||
- syn cluster pythonExpression contains=pythonStatement,pythonRepeat,pythonConditional,pythonOperator,pythonNumber,pythonHexNumber,pythonOctNumber,pythonBinNumber,pythonFloat,pythonString,pythonFString,pythonRawString,pythonRawFString,pythonBytes,pythonBoolean,pythonNone,pythonSingleton,pythonBuiltinObj,pythonBuiltinFunc,pythonBuiltinType,pythonClassVar | ||
+ syn cluster pythonExpression contains=pythonStatement,pythonRepeat,pythonConditional,pythonMatch,pythonOperator,pythonNumber,pythonHexNumber,pythonOctNumber,pythonBinNumber,pythonFloat,pythonString,pythonFString,pythonRawString,pythonRawFString,pythonBytes,pythonBoolean,pythonNone,pythonSingleton,pythonBuiltinObj,pythonBuiltinFunc,pythonBuiltinType,pythonClassVar | ||
endif | ||
|
||
|
||
@@ -434,6 +435,7 @@ if v:version >= 508 || !exists('did_python_syn_inits') | ||
HiLink pythonFunction Function | ||
HiLink pythonFunctionCall Function | ||
HiLink pythonConditional Conditional | ||
+ HiLink pythonMatch Conditional | ||
HiLink pythonRepeat Repeat | ||
HiLink pythonException Exception | ||
HiLink pythonOperator Operator | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters