1" Vim syntax file 2" Language: 3D wavefront's obj file 3" Maintainer: Vincent Berthoux <[email protected]> 4" File Types: .obj (used in 3D) 5" Last Change: 2010 May 18 6" 7" quit when a syntax file was already loaded 8if exists("b:current_syntax") 9 finish 10endif 11 12syn match objError "^\a\+" 13 14syn match objKeywords "^cstype\s" 15syn match objKeywords "^ctech\s" 16syn match objKeywords "^stech\s" 17syn match objKeywords "^deg\s" 18syn match objKeywords "^curv\(2\?\)\s" 19syn match objKeywords "^parm\s" 20syn match objKeywords "^surf\s" 21syn match objKeywords "^end\s" 22syn match objKeywords "^bzp\s" 23syn match objKeywords "^bsp\s" 24syn match objKeywords "^res\s" 25syn match objKeywords "^cdc\s" 26syn match objKeywords "^con\s" 27 28syn match objKeywords "^shadow_obj\s" 29syn match objKeywords "^trace_obj\s" 30syn match objKeywords "^usemap\s" 31syn match objKeywords "^lod\s" 32syn match objKeywords "^maplib\s" 33syn match objKeywords "^d_interp\s" 34syn match objKeywords "^c_interp\s" 35syn match objKeywords "^bevel\s" 36syn match objKeywords "^mg\s" 37syn match objKeywords "^s\s" 38syn match objKeywords "^con\s" 39syn match objKeywords "^trim\s" 40syn match objKeywords "^hole\s" 41syn match objKeywords "^scrv\s" 42syn match objKeywords "^sp\s" 43syn match objKeywords "^step\s" 44syn match objKeywords "^bmat\s" 45syn match objKeywords "^csh\s" 46syn match objKeywords "^call\s" 47 48syn match objComment "^#.*" 49syn match objVertex "^v\s" 50syn match objFace "^f\s" 51syn match objVertice "^vt\s" 52syn match objNormale "^vn\s" 53syn match objGroup "^g\s.*" 54syn match objMaterial "^usemtl\s.*" 55syn match objInclude "^mtllib\s.*" 56 57syn match objFloat "-\?\d\+\.\d\+\(e\(+\|-\)\d\+\)\?" 58syn match objInt "\d\+" 59syn match objIndex "\d\+\/\d*\/\d*" 60 61" Define the default highlighting. 62" Only when an item doesn't have highlighting yet 63command -nargs=+ HiLink hi def link <args> 64 65HiLink objError Error 66HiLink objComment Comment 67HiLink objInclude PreProc 68HiLink objFloat Float 69HiLink objInt Number 70HiLink objGroup Structure 71HiLink objIndex Constant 72HiLink objMaterial Label 73 74HiLink objVertex Keyword 75HiLink objNormale Keyword 76HiLink objVertice Keyword 77HiLink objFace Keyword 78HiLink objKeywords Keyword 79 80 81delcommand HiLink 82 83let b:current_syntax = "obj" 84 85" vim: ts=8 86