0
0
mirror of https://github.com/vim/vim.git synced 2025-07-04 23:07:33 -04:00

runtime(python): Fix wrong define regex in ftplugin (#14763)

Signed-off-by: Tom Picton <tom@tompicton.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Tom Picton 2024-05-13 16:00:40 -04:00 committed by GitHub
parent 2f5ff73827
commit 7961210b86
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,7 +3,7 @@
" Maintainer: Tom Picton <tom@tompicton.com> " Maintainer: Tom Picton <tom@tompicton.com>
" Previous Maintainer: James Sully <sullyj3@gmail.com> " Previous Maintainer: James Sully <sullyj3@gmail.com>
" Previous Maintainer: Johannes Zellner <johannes@zellner.org> " Previous Maintainer: Johannes Zellner <johannes@zellner.org>
" Last Change: 2024/05/11 " Last Change: 2024/05/13
" https://github.com/tpict/vim-ftplugin-python " https://github.com/tpict/vim-ftplugin-python
if exists("b:did_ftplugin") | finish | endif if exists("b:did_ftplugin") | finish | endif
@ -14,7 +14,7 @@ set cpo&vim
setlocal cinkeys-=0# setlocal cinkeys-=0#
setlocal indentkeys-=0# setlocal indentkeys-=0#
setlocal include=^\\s*\\(from\\\|import\\) setlocal include=^\\s*\\(from\\\|import\\)
setlocal define=^\\s*\\([async ]\\?def\\\|class\\) setlocal define=^\\s*\\(\\(async\\s\\+\\)\\?def\\\|class\\)
" For imports with leading .., append / and replace additional .s with ../ " For imports with leading .., append / and replace additional .s with ../
let b:grandparent_match = '^\(.\.\)\(\.*\)' let b:grandparent_match = '^\(.\.\)\(\.*\)'