vim-patch:partial:dd60c365cd26 (#22437)

vim-patch:partial:dd60c365cd26

Update runtime files

dd60c365cd

Co-authored-by: Bram Moolenaar <Bram@vim.org>

Skip: eval.txt, repeat.txt (needs `getscriptinfo()`)
This commit is contained in:
Christian Clason
2023-02-28 09:34:27 +01:00
committed by GitHub
parent 8acb3d742c
commit 66c384d4e8
25 changed files with 638 additions and 169 deletions

View File

@ -1,7 +1,7 @@
" Vim syntax file
" Language: Python
" Maintainer: Zvezdan Petkovic <zpetkovic@acm.org>
" Last Change: 2022 Jun 28
" Last Change: 2023 Feb 26
" Credits: Neil Schemenauer <nas@python.ca>
" Dmitry Vasiliev
"
@ -35,12 +35,26 @@
"
" let python_highlight_all = 1
"
" The use of Python 2 compatible syntax highlighting can be enforced.
" The straddling code (Python 2 and 3 compatible), up to Python 3.5,
" will be also supported.
"
" let python_use_python2_syntax = 1
"
" This option will exclude all modern Python 3.6 or higher features.
"
" quit when a syntax file was already loaded.
if exists("b:current_syntax")
finish
endif
" Use of Python 2 and 3.5 or lower requested.
if exists("python_use_python2_syntax")
runtime! syntax/python2.vim
finish
endif
" We need nocompatible mode in order to continue lines with backslashes.
" Original setting will be restored.
let s:cpo_save = &cpo
@ -91,8 +105,8 @@ syn keyword pythonInclude from import
syn keyword pythonAsync async await
" Soft keywords
" These keywords do not mean anything unless used in the right context
" See https://docs.python.org/3/reference/lexical_analysis.html#soft-keywords
" These keywords do not mean anything unless used in the right context.
" See https://docs.python.org/3/reference/lexical_analysis.html#soft-keywords
" for more on this.
syn match pythonConditional "^\s*\zscase\%(\s\+.*:.*$\)\@="
syn match pythonConditional "^\s*\zsmatch\%(\s\+.*:\s*\%(#.*\)\=$\)\@="