" Vim syntax file " Language: Cg " Maintainer: Camilla Berglund " Last Change: August 5, 2008 " File Types: .cg " Version: 0.2 " Quit when a (custom) syntax file was already loaded if exists("b:current_syntax") finish endif setlocal iskeyword=a-z,A-Z,48-57,_,> " Language keywords syn keyword cgKeyword asm asm_fragment auto syn keyword cgKeyword break syn keyword cgKeyword catch class column_major compile const const_cast continue syn keyword cgKeyword decl discard dynamic_cast syn keyword cgKeyword emit enum explicit extern syn keyword cgKeyword friend get goto if in inline inout syn keyword cgKeyword interface mutable namespace new operator out packed pass pixelfragment pixelshader syn keyword cgKeyword private protected public register reinterpret_cast return row_major syn keyword cgKeyword sampler_state shared sizeof static static_cast syn keyword cgKeyword struct technique template texture texture1D texture2D texture3D textureCUBE textureRECT syn keyword cgKeyword this throw try typedef typeid typename uniform union using vertexfragment vertexshader syn keyword cgKeyword virtual volatile syn keyword cgType bool char double dword fixed float half int long matrix vector sampler syn keyword cgType samplerCUBE short signed string unsigned void syn keyword cgRepeat do for while syn keyword cgConditional if else switch case default syn match cgType display /\/ syn match cgType display /\/ syn match cgType display /\/ syn match cgInteger display /\<\d\+\>/ syn match cgInteger display /\<0x\x\+\>/ syn match cgFloat display /\<\d\+.\d\+\>/ syn keyword cgConstant FALSE TRUE syn region cgParens start=/(/ end=/)/ contains=ALL syn region cgBlock start=/{/ end=/}/ contains=ALL fold syn match cgComment /\/\/.*$/ contains=cgCommentTodo,@Spell syn region cgComment start=/\/\*/ end=/\*\// contains=cgCommentTodo,@Spell syn keyword cgCommentTodo contained TODO FIXME XXX hi def link cgKeyword Keyword hi def link cgType Type hi def link cgRepeat Repeat hi def link cgConditional Conditional hi def link cgInteger Number hi def link cgFloat Float hi def link cgConstant Constant hi def link cgComment Comment hi def link cgCommentTodo Todo