From dc573ebdd520bf3b4d7cecef767cc26b3fbc5dbd Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Fri, 28 Aug 2009 20:25:53 +0000 Subject: [PATCH] added vim syntax file for .fart scene description files git-svn-id: svn://anubis/fart/trunk@247 7f9b0f55-74a9-4bce-be96-3c2cd072584d --- .todo | 1 - vim/fart.vim | 21 +++++++++++++++++++++ vim/vimrc | 3 +++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 vim/fart.vim create mode 100644 vim/vimrc 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")