patch 9.0.0055: bitbake files are not detected
Problem: Bitbake files are not detected.
Solution: Add bitbake filetype detection by file name and contents. (Gregory
Anders, closes #10697)
diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim
index a96bdf5..708a42a 100644
--- a/runtime/autoload/dist/ft.vim
+++ b/runtime/autoload/dist/ft.vim
@@ -519,12 +519,14 @@
# headers so assume POV-Ray
elseif lines =~ '^\s*\%({\|(\*\)' || lines =~? ft_pascal_keywords
setf pascal
+ elseif lines =~# '\<\%(require\|inherit\)\>' || lines =~# '\w\+ = '
+ setf bitbake
else
FTasmsyntax()
if exists("b:asmsyntax")
- exe "setf " .. fnameescape(b:asmsyntax)
+ exe "setf " .. fnameescape(b:asmsyntax)
else
- setf pov
+ setf pov
endif
endif
endif
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 42bd4be..761ed3f 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -252,6 +252,9 @@
" Blank
au BufNewFile,BufRead *.bl setf blank
+" Bitbake
+au BufNewFile,BufRead *.bb,*.bbappend,*.bbclass,*/build/conf/*.conf,*/meta{-*,}/conf/*.conf setf bitbake
+
" Blkid cache file
au BufNewFile,BufRead */etc/blkid.tab,*/etc/blkid.tab.old setf xml