From 7961210b861ce9a1a773cfc1fe96b388216bb1f2 Mon Sep 17 00:00:00 2001 From: Tom Picton Date: Mon, 13 May 2024 16:00:40 -0400 Subject: [PATCH] runtime(python): Fix wrong define regex in ftplugin (#14763) Signed-off-by: Tom Picton Signed-off-by: Christian Brabandt --- runtime/ftplugin/python.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/ftplugin/python.vim b/runtime/ftplugin/python.vim index 3a7190201f..c000296726 100644 --- a/runtime/ftplugin/python.vim +++ b/runtime/ftplugin/python.vim @@ -3,7 +3,7 @@ " Maintainer: Tom Picton " Previous Maintainer: James Sully " Previous Maintainer: Johannes Zellner -" Last Change: 2024/05/11 +" Last Change: 2024/05/13 " https://github.com/tpict/vim-ftplugin-python if exists("b:did_ftplugin") | finish | endif @@ -14,7 +14,7 @@ set cpo&vim setlocal cinkeys-=0# setlocal indentkeys-=0# 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 ../ let b:grandparent_match = '^\(.\.\)\(\.*\)'