author | dessaya
<dessaya> 2004-10-30 00:19:29 UTC |
committer | dessaya
<dessaya> 2004-10-30 00:19:29 UTC |
parent | 71224b3ecb367971bd8152d1191a132782bd67cd |
stuff/vimsyntax/ftdetect/fpconf.vim | +1 | -0 |
stuff/vimsyntax/ftdetect/fpstates.vim | +1 | -0 |
stuff/vimsyntax/syntax/fpstates.vim | +46 | -0 |
diff --git a/stuff/vimsyntax/ftdetect/fpconf.vim b/stuff/vimsyntax/ftdetect/fpconf.vim new file mode 100644 index 0000000..1f64753 --- /dev/null +++ b/stuff/vimsyntax/ftdetect/fpconf.vim @@ -0,0 +1 @@ +au BufRead,BufNewFile states.conf set filetype=fpstates diff --git a/stuff/vimsyntax/ftdetect/fpstates.vim b/stuff/vimsyntax/ftdetect/fpstates.vim new file mode 100644 index 0000000..1f64753 --- /dev/null +++ b/stuff/vimsyntax/ftdetect/fpstates.vim @@ -0,0 +1 @@ +au BufRead,BufNewFile states.conf set filetype=fpstates diff --git a/stuff/vimsyntax/syntax/fpstates.vim b/stuff/vimsyntax/syntax/fpstates.vim new file mode 100644 index 0000000..3f3880b --- /dev/null +++ b/stuff/vimsyntax/syntax/fpstates.vim @@ -0,0 +1,46 @@ +" Vim syntax file +" Language: FreePrince states file +" Maintainer: Diego Essaya <dessaya@fi.uba.ar> +" Last Change: $Date: 2004-10-30 00:19:29 $ +" 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 + +syn case match + +syntax match fpComment /#.*$/ contains=fpTodo +syntax match fpTodo /\<TODO\>/ contained +syntax match fpState /^\S\+:/me=e-1 +syntax match fpAction /^\taction\>/ms=s+1 nextgroup=fpTitle skipwhite +syntax match fpTitle /.*/ contained +syntax match fpProps /^\t\t\(conditions\|next\|steps\|animation\|level\|guardskill\|mark\)\>/ms=s+2 +syntax match fpIdent /^\t\t\t\S\+/ms=s+3 nextgroup=fpValue skipwhite contains=fpNumber,fpOp +syntax match fpValue /\w\+/ contained + +"syntax region fpFlags start=/^\t\t\t\d\+-\d\+\s\+/ms=e end=/$/ oneline +"syntax match fbRange1 /^\t\t\t\d\+/ nextgroup=fbRangeSep +"syntax match fbRangeSep /\-/ contained nextgroup=fbRange2 +"syntax match fbRange2 /\d\+/ contained nextgroup=fbFlags skipwhite +"syntax match fbFlags /[ps]\+/ contained + +syntax match fpNumber /\<\d\+\>/ contained +syntax match fpOp /[:;\-+()*&^%$@!~.,/]/ + +highlight link fpComment Comment +highlight link fpState Label +highlight link fpAction Keyword +highlight link fpProps Keyword +highlight link fpIdent Identifier +highlight link fpNumber Constant +highlight link fpValue Constant +highlight link fpOp Operator +highlight link fpFlags Operator +highlight link fpTitle Function +highlight link fpTodo Todo