From 249793af751127ee28be2565974944fd42ae1789 Mon Sep 17 00:00:00 2001 From: Joshua Watt Date: Wed, 15 Oct 2025 14:51:16 -0600 Subject: [PATCH] bitbake: contrib: vim: Update file detection regex The regex used to detect bitbake files was improved in patch 9.1.1732. Update the plugin to match that logic and fix a bug where the wrong expression was used to set the file type (Bitbake rev: 7ce0c9b44968f80a6060f9f9ff2cc00823b772cc) Signed-off-by: Joshua Watt Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- bitbake/contrib/vim/ftdetect/bitbake.vim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bitbake/contrib/vim/ftdetect/bitbake.vim b/bitbake/contrib/vim/ftdetect/bitbake.vim index 427ab5b987..1d958fec54 100644 --- a/bitbake/contrib/vim/ftdetect/bitbake.vim +++ b/bitbake/contrib/vim/ftdetect/bitbake.vim @@ -14,12 +14,12 @@ endif au BufNewFile,BufRead *.{bb,bbappend,bbclass} setfiletype bitbake " .inc -- meanwhile included upstream -if !has("patch-9.0.0055") +if !has("patch-9.1.1732") au BufNewFile,BufRead *.inc call s:BBIncDetect() def s:BBIncDetect() - l:lines = getline(1) .. getline(2) .. getline(3) - if l:lines =~# '\<\%(require\|inherit\)\>' || lines =~# '[A-Z][A-Za-z0-9_:${}]*\s\+\%(??\|[?:+]\)\?= ' - set filetype bitbake + var lines = getline(1) .. getline(2) .. getline(3) + if lines =~# '\<\%(require\|inherit\)\>' || lines =~# '[A-Z][A-Za-z0-9_:${}/]*\s\+\%(??\|[?:+.]\)\?=.\? ' + set filetype=bitbake endif enddef endif