Skip to contentSkip to conversation

bitbake.vim: detect *.bbappend files in ftdetect automatically

PATCH In review Eren Türkay 2 participants 3 messages Dec 12, 2012

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 bitbake.vim: detect *.bbappend files in ftdetect automatically

Currently, *.bb and *.bbclass files are automatically highlighted and detected as a bitbake file. Since *.bbappend files are also bitbake files, vim plugin should automatically detect and highlight it as well.

---
 contrib/vim/ftdetect/bitbake.vim |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
contrib/vim/ftdetect/bitbake.vim +2 -2
index 179e4d9..b9529e6 100644
@@ -10,8 +10,8 @@ if &compatible || version < 600
     finish
 endif
 
-" .bb and .bbclass
-au BufNewFile,BufRead *.b{b,bclass}	set filetype=bitbake
+" .bb, .bbappend and .bbclass
+au BufNewFile,BufRead *.{bb,bbappend,bbclass}	set filetype=bitbake
 
 " .inc
 au BufNewFile,BufRead *.inc 		set filetype=bitbake
Signature · 1 line
1.7.7.5
#1 lore raw
Quoted 12 lines · Eren Türkay

Currently, *.bb and *.bbclass files are automatically highlighted and detected as a bitbake file. Since *.bbappend files are also bitbake files, vim plugin should automatically detect and highlight it as well.

---
 contrib/vim/ftdetect/bitbake.vim |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
contrib/vim/ftdetect/bitbake.vim +0 -0
index 179e4d9..b9529e6 100644

contrib/vim/ftdetect/bitbake.vim if &compatible || version < 600 · line 14

Quoted 7 lines
contrib/vim/ftdetect/bitbake.vim +2 -2
@@ -10,8 +10,8 @@ if &compatible || version < 600
     finish
 endif
 
-" .bb and .bbclass
-au BufNewFile,BufRead *.b{b,bclass}    set filetype=bitbake
+" .bb, .bbappend and .bbclass
+au BufNewFile,BufRead *.{bb,bbappend,bbclass}  set filetype=bitbake

fwiw: you can probably add .inc too, but some people will probably find it conflicting with some other ftdetect.. :/

#2 lore raw
Quoted 2 lines · Martin Jansa

fwiw: you can probably add .inc too, but some people will probably find it conflicting with some other ftdetect.. :/

*.inc and *.conf are already defined in the lines 16 and 19. I haven't had any problems with them as I don't have conflicting files.

I wonder why *.bbinc isn't used instead of such a generic name *.inc :) With a lot of recipes referencing *.inc, changing the suffix just for vim plugin wouldn't be suitable. However, for the sake of consistency with bb{class,append}, changing the practice of using *.inc to *.bbinc could be good in some time.

Regards,
Eren

Signature · 2 lines
    . 73! DE TA1AET
      http://linkedin.com/in/erenturkay