diff --git a/.todo b/.todo index ba28ef0..dee4a81 100644 --- a/.todo +++ b/.todo @@ -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 diff --git a/vim/fart.vim b/vim/fart.vim new file mode 100644 index 0000000..7d2e494 --- /dev/null +++ b/vim/fart.vim @@ -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" diff --git a/vim/vimrc b/vim/vimrc new file mode 100644 index 0000000..a9ee86f --- /dev/null +++ b/vim/vimrc @@ -0,0 +1,3 @@ +if has("autocmd") + autocmd BufRead *.fart set syntax=fart +endif " has("autocmd")