]> git.mxchange.org Git - flightgear.git/blob - utils/syntax/ac3d.vim
vim syntax files for *.ac and *.nas files. See nasal.vim for how to use them.
[flightgear.git] / utils / syntax / ac3d.vim
1 if !exists("main_syntax")
2   if version < 600
3     syntax clear
4 "  elseif exists("b:current_syntax")
5 "    finish
6   endif
7   let main_syntax = 'ac3d'
8 endif
9
10 "setlocal iskeyword=46,95,97-122
11
12 syn keyword ac3dIdentifier      AC3Db
13 syn region  ac3dMaterial        start=+^MATERIAL+ end=+$+ contains=ac3dSTringS,ac3dStringD,ac3dMatKeyword
14 syn match   ac3dError           display +^OBJECT+
15 syn match   ac3dObject          display +^OBJECT\s\+\(world\|group\|poly\)\s*$+
16 syn match   ac3dMaterial        display +^SURF.*+
17 syn region  ac3dStringS         start=+'+  end=+'+
18 syn region  ac3dStringD         start=+"+  end=+"+
19 syn match   ac3dFunction        display +^\(crease\|mat\|texture\|texrep\|texoff\|url\|data\|refs\)+
20 syn match   ac3dFunction        display +^\(numvert\|numsurf\|kids\|name\|SURF\|loc\)+
21 syn keyword ac3dMatKeyword      MATERIAL rgb amb emis spec shi trans
22
23
24
25 " Define the default highlighting.
26 " For version 5.7 and earlier: only when not done already
27 " For version 5.8 and later: only when an item doesn't have highlighting yet
28 if version >= 508 || !exists("did_ac3d_syn_inits")
29   if version < 508
30     let did_ac3d_syn_inits = 1
31     command -nargs=+ HiLink hi link <args>
32   else
33     command -nargs=+ HiLink hi def link <args>
34   endif
35   HiLink ac3dMatKeyword        Statement
36   HiLink ac3dStringS           String
37   HiLink ac3dStringD           String
38   HiLink ac3dIdentifier        Identifier
39   HiLink ac3dObject            Identifier
40
41   HiLink ac3dFunction          Function
42   HiLink ac3dComment           Comment
43   HiLink ac3dSpecial           Special
44   HiLink ac3dCharacter         Character
45   HiLink ac3dNumber            Number
46   HiLink ac3dFloat             Float
47   HiLink ac3dIdentifier        Identifier
48   HiLink ac3dConditional       Conditional
49   HiLink ac3dRepeat            Repeat
50   HiLink ac3dOperator          Operator
51   HiLink ac3dType              Type
52   HiLink ac3dError             Error
53   HiLink ac3dBoolean           Boolean
54   delcommand HiLink
55 endif
56
57 let b:current_syntax = "ac3d"
58 if main_syntax == 'ac3d'
59   unlet main_syntax
60 endif
61
62 " vim: ts=8