xref: /OK3568_Linux_fs/yocto/poky/bitbake/contrib/vim/ftdetect/bitbake.vim (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun" Vim filetype detection file
2*4882a593Smuzhiyun" Language:     BitBake
3*4882a593Smuzhiyun" Author:       Ricardo Salveti <rsalveti@rsalveti.net>
4*4882a593Smuzhiyun" Copyright:    Copyright (C) 2008  Ricardo Salveti <rsalveti@rsalveti.net>
5*4882a593Smuzhiyun" Licence:      You may redistribute this under the same terms as Vim itself
6*4882a593Smuzhiyun"
7*4882a593Smuzhiyun" This sets up the syntax highlighting for BitBake files, like .bb, .bbclass and .inc
8*4882a593Smuzhiyun
9*4882a593Smuzhiyunif &compatible || version < 600 || exists("b:loaded_bitbake_plugin")
10*4882a593Smuzhiyun    finish
11*4882a593Smuzhiyunendif
12*4882a593Smuzhiyun
13*4882a593Smuzhiyun" .bb, .bbappend and .bbclass
14*4882a593Smuzhiyunau BufNewFile,BufRead *.{bb,bbappend,bbclass}  set filetype=bitbake
15*4882a593Smuzhiyun
16*4882a593Smuzhiyun" .inc
17*4882a593Smuzhiyunau BufNewFile,BufRead *.inc		set filetype=bitbake
18*4882a593Smuzhiyun
19*4882a593Smuzhiyun" .conf
20*4882a593Smuzhiyunau BufNewFile,BufRead *.conf
21*4882a593Smuzhiyun    \ if (match(expand("%:p:h"), "conf") > 0) |
22*4882a593Smuzhiyun    \     set filetype=bitbake |
23*4882a593Smuzhiyun    \ endif
24*4882a593Smuzhiyun
25