git » fp-git.git » commit 077f8ca

add fpanims.vim

author dessaya
2005-03-10 21:39:10 UTC
committer dessaya
2005-03-10 21:39:10 UTC
parent b2532cb02d78e6842c4a382c503e9db51bff0bd1

add fpanims.vim

stuff/vimsyntax/ftdetect/fpconf.vim +1 -0
stuff/vimsyntax/ftdetect/fpstates.vim +1 -0
stuff/vimsyntax/syntax/fpanims.vim +78 -0

diff --git a/stuff/vimsyntax/ftdetect/fpconf.vim b/stuff/vimsyntax/ftdetect/fpconf.vim
index a8e67b1..726dad8 100644
--- a/stuff/vimsyntax/ftdetect/fpconf.vim
+++ b/stuff/vimsyntax/ftdetect/fpconf.vim
@@ -2,3 +2,4 @@ au BufRead,BufNewFile main.conf			set filetype=fpstates
 au BufRead,BufNewFile titles.conf			set filetype=fpstates
 au BufRead,BufNewFile flags.conf			set filetype=fpflags
 au BufRead,BufNewFile tiles.conf			set filetype=fptiles
+au BufRead,BufNewFile anims.conf			set filetype=fpanims
diff --git a/stuff/vimsyntax/ftdetect/fpstates.vim b/stuff/vimsyntax/ftdetect/fpstates.vim
index a8e67b1..726dad8 100644
--- a/stuff/vimsyntax/ftdetect/fpstates.vim
+++ b/stuff/vimsyntax/ftdetect/fpstates.vim
@@ -2,3 +2,4 @@ au BufRead,BufNewFile main.conf			set filetype=fpstates
 au BufRead,BufNewFile titles.conf			set filetype=fpstates
 au BufRead,BufNewFile flags.conf			set filetype=fpflags
 au BufRead,BufNewFile tiles.conf			set filetype=fptiles
+au BufRead,BufNewFile anims.conf			set filetype=fpanims
diff --git a/stuff/vimsyntax/syntax/fpanims.vim b/stuff/vimsyntax/syntax/fpanims.vim
new file mode 100644
index 0000000..a394997
--- /dev/null
+++ b/stuff/vimsyntax/syntax/fpanims.vim
@@ -0,0 +1,78 @@
+" Vim syntax file
+" Language:	FreePrince animations description file (anim.conf)
+" Maintainer:	Diego Essaya <dessaya@fi.uba.ar>
+" Last Change:	$Date: 2005-03-10 21:39:10 $
+" URL: http://www.fp.princed.com.ar/
+" $Revision: 1.1 $
+
+" For version 5.x: Clear all syntax items
+" For version 6.x: Quit when a syntax file was already loaded
+if version < 600
+  syntax clear
+elseif exists("b:current_syntax")
+  finish
+endif
+
+syntax case ignore
+
+syntax match fpError /\S[^#]*.*/ contained contains=fpComment
+syntax match fpErrorLine /\s*\S\+/ contains=fpError
+highlight link fpError   Error
+
+"-------------------
+
+syntax match fpName /\S\+/ contained contains=fpIdent
+syntax match fpWav /\<wav\>/ contained nextgroup=fpName skipwhite contains=fpKeyword
+syntax match fpSpeaker /\<speaker\>/ contained nextgroup=fpName skipwhite contains=fpKeyword
+syntax match fpMidi /\<midi\>/ contained nextgroup=fpName skipwhite contains=fpKeyword
+
+"-------------------
+
+syntax match fpObjMirror /\<\(yes\|no\)\>/ contained contains=fpKeyword
+syntax match fpObjFloor /\<\(up\|middle\|down\|center\|\d\+\)\>/ contained nextgroup=fpObjMirror skipwhite contains=fpKeyword,fpNumber
+syntax match fpObjLoc /\d\+/ contained nextgroup=fpObjFloor skipwhite contains=fpNumber
+syntax match fpObjState /\S\+/ contained nextgroup=fpObjLoc skipwhite contains=fpIdent
+syntax match fpObjDur /\<\(\d\+\|infinite\|untilexit\)\>/ contained nextgroup=fpObjState skipwhite contains=fpNumber,fpKeyword
+syntax match fpObjName /\S\+/ contained nextgroup=fpObjDur skipwhite contains=fpIdent
+syntax match fpObject /\<object\>/ contained nextgroup=fpObjName skipwhite contains=fpKeyword
+
+"-------------------
+
+syntax match fpImgY /\<\(\d\+\|top\|bottom\)\>/ contained contains=fpNumber,fpKeyword
+syntax match fpImgX /\<\(\d\+\|left\|right\)\>/ contained nextgroup=fpImgY skipwhite contains=fpNumber,fpKeyword
+syntax match fpImgLayer /\<\(bottom\|top\)\>/ contained nextgroup=fpImgX skipwhite contains=fpKeyword
+syntax match fpImgDur /\<\(\d\+\|infinite\)\>/ contained nextgroup=fpImgLayer skipwhite contains=fpNumber,fpKeyword
+syntax match fpImgName /\S\+/ contained nextgroup=fpImgDur skipwhite contains=fpIdent
+syntax match fpImage /\<image\>/ contained nextgroup=fpImgName skipwhite contains=fpKeyword
+
+"-------------------
+
+syntax match fpFrameNo /^\s*\d\+/ contains=fpNumber nextgroup=fpImage,fpObject,fpMidi,fpWav,fpSpeaker skipwhite
+
+"-------------------
+
+syntax match fpAnimNum /\d\+/ contained contains=fpNumber
+syntax match fpAnimName /\w\+/ contained nextgroup=fpAnimNum skipwhite contains=fpIdent
+syntax match fpAnimLine /^animation\>/ contains=fpKeyword nextgroup=fpAnimName skipwhite
+
+"-------------------
+
+syntax match fpKeyword /\<\a\w*\>/ contained
+highlight link fpKeyword  Keyword
+
+syntax match fpIdent /\<\a\w*\>/ contained
+highlight link fpIdent  Identifier
+
+syntax match fpNumber /\d\+/ contained
+highlight link fpNumber  Constant
+
+syntax match fpOp /[:;\-+()*&^%$@!~.,/]/ contained
+highlight link fpOp      Operator
+
+syntax match fpComment /#.*$/ contains=fpTodo contained
+syntax match fpCommentedLine /\s*#.*$/ contains=fpComment
+highlight link fpComment Comment
+
+syntax match fpTodo /\<TODO\>/ contained
+highlight link fpTodo    Todo
+