summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/contrib/vim/ftdetect/bitbake.vim14
1 files changed, 11 insertions, 3 deletions
diff --git a/bitbake/contrib/vim/ftdetect/bitbake.vim b/bitbake/contrib/vim/ftdetect/bitbake.vim
index 09fc4dc74c..427ab5b987 100644
--- a/bitbake/contrib/vim/ftdetect/bitbake.vim
+++ b/bitbake/contrib/vim/ftdetect/bitbake.vim
@@ -11,10 +11,18 @@ if &compatible || version < 600 || exists("b:loaded_bitbake_plugin")
11endif 11endif
12 12
13" .bb, .bbappend and .bbclass 13" .bb, .bbappend and .bbclass
14au BufNewFile,BufRead *.{bb,bbappend,bbclass} set filetype=bitbake 14au BufNewFile,BufRead *.{bb,bbappend,bbclass} setfiletype bitbake
15 15
16" .inc 16" .inc -- meanwhile included upstream
17au BufNewFile,BufRead *.inc set filetype=bitbake 17if !has("patch-9.0.0055")
18 au BufNewFile,BufRead *.inc call s:BBIncDetect()
19 def s:BBIncDetect()
20 l:lines = getline(1) .. getline(2) .. getline(3)
21 if l:lines =~# '\<\%(require\|inherit\)\>' || lines =~# '[A-Z][A-Za-z0-9_:${}]*\s\+\%(??\|[?:+]\)\?= '
22 set filetype bitbake
23 endif
24 enddef
25endif
18 26
19" .conf 27" .conf
20au BufNewFile,BufRead *.conf 28au BufNewFile,BufRead *.conf