added vim syntax file for .fart scene description files

git-svn-id: svn://anubis/fart/trunk@247 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
Josh Holtrop 2009-08-28 20:25:53 +00:00
parent ff39cc1a1b
commit dc573ebdd5
3 changed files with 24 additions and 1 deletions

1
.todo
View File

@ -10,7 +10,6 @@ FART To-Do List
- Add spotlight and directional light types
Low Priority:
- Vim syntax file
- Refraction
- Textures in materials
- Fix boolean objects composed of sub-objects of different transparencies

21
vim/fart.vim Normal file
View File

@ -0,0 +1,21 @@
" Vim syntax file
" Setup
if version >= 600
" Quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
endif
syn case match
syn keyword fartKeywords ambient color define diffuse height look_at material max_depth multisample options position radius reflectance rotate scale shininess size specular translate transparency union up vfov width
syn keyword fartObjects box camera cyl intersect light plane scene sphere subtract union
syn match fartNumber "\(^\|\W\)\@<=[+-]\=\(\d\+\)\=\.\=\d\+\([eE][+-]\=\d\+\)\="
hi def link fartKeywords Operator
hi def link fartObjects Type
hi def link fartNumber Number
let b:current_syntax = "fart"

3
vim/vimrc Normal file
View File

@ -0,0 +1,3 @@
if has("autocmd")
autocmd BufRead *.fart set syntax=fart
endif " has("autocmd")