mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
runtime(python): optimize pythonSync pattern
Order the keywords by expected frequency: "def" and "class" are assumed to be more likely than "async def" in the majority of Python code. closes: #18032 Signed-off-by: Jon Parise <jon@indelible.org> Signed-off-by: Zvezdan Petkovic <zpetkovic@acm.org> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
1526d4f23c
commit
2f7e4eb335
@@ -1,7 +1,7 @@
|
|||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: Python
|
" Language: Python
|
||||||
" Maintainer: Zvezdan Petkovic <zpetkovic@acm.org>
|
" Maintainer: Zvezdan Petkovic <zpetkovic@acm.org>
|
||||||
" Last Change: 2025 Aug 13
|
" Last Change: 2025 Aug 18
|
||||||
" Credits: Neil Schemenauer <nas@python.ca>
|
" Credits: Neil Schemenauer <nas@python.ca>
|
||||||
" Dmitry Vasiliev
|
" Dmitry Vasiliev
|
||||||
" Rob B
|
" Rob B
|
||||||
@@ -372,7 +372,7 @@ if !exists("python_no_doctest_highlight")
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
" Sync at the beginning of (async) function or class definitions.
|
" Sync at the beginning of (async) function or class definitions.
|
||||||
syn sync match pythonSync grouphere NONE "^\%(async\s\+def\|def\|class\)\s\+\h\w*\s*[(:]"
|
syn sync match pythonSync grouphere NONE "^\%(def\|class\|async\s\+def\)\s\+\h\w*\s*[(:]"
|
||||||
|
|
||||||
" The default highlight links. Can be overridden later.
|
" The default highlight links. Can be overridden later.
|
||||||
hi def link pythonStatement Statement
|
hi def link pythonStatement Statement
|
||||||
|
Reference in New Issue
Block a user