From 92fcddd1523dda8f75ffb6edf23b56546d543cbd Mon Sep 17 00:00:00 2001 From: jtmr05 <62111562+jtmr05@users.noreply.github.com> Date: Wed, 19 Apr 2023 15:29:42 +0000 Subject: [PATCH] Update python.vim Highlight `match` and `case` soft keywords --- syntax/python.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/syntax/python.vim b/syntax/python.vim index a9e7801da..a5535afa6 100644 --- a/syntax/python.vim +++ b/syntax/python.vim @@ -85,6 +85,8 @@ if s:Enabled('g:python_highlight_class_vars') endif syn keyword pythonRepeat for while syn keyword pythonConditional if elif else +syn match pythonConditional "^\s*\zscase\%(\s\+.*:.*$\)\@=" +syn match pythonConditional "^\s*\zsmatch\%(\s\+.*:\s*\%(#.*\)\=$\)\@=" 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.