From 410358f555cbe41f10658ce2693633c00ecfab08 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Fri, 16 Jan 2009 18:39:44 -0500 Subject: changes to todo, added fortress stuff for vim --- .vim/syntax/fortress.vim | 90 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 .vim/syntax/fortress.vim (limited to '.vim/syntax') diff --git a/.vim/syntax/fortress.vim b/.vim/syntax/fortress.vim new file mode 100644 index 0000000..13aacbb --- /dev/null +++ b/.vim/syntax/fortress.vim @@ -0,0 +1,90 @@ +" Vim syntax file +" Language: Fortress +" Filenames: *.fsi *.fss +" Maintainers: Jon Rafkind +" URL: http://www.cs.utah.edu/~rafkind +" Last Change: 2008 May 20 - Initial version + +" Some stuff stolen from ocaml.vim + +if version < 600 + syntax clear +elseif exists("b:current_syntax") && b:current_syntax == "fortress" + finish +endif + +" syn region fortressComment start="(\*)" end="\\$" end="$" +syn region fortressComment start="(\*" end="\*)" contains=fortressComment +syn match fortressLineComment "(\*).*" +syn match fortressEnd "\" + +" syn match fortressKeyword "\" +syn keyword fortressKeyword getter else var test +syn keyword fortressExternal import export + +syn region fortressString start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match fortressChar "'.'" +syn match fortressNumber "\<-\=\d\(_\|\d\)*" + +syn keyword fortressType api object trait value +syn keyword fortressType extends abstract comprises +syn keyword fortressType grammar component +syn keyword fortressType Any Boolean String self +syn keyword fortressType Char +syn keyword fortressType ZZ32 ZZ64 RR32 RR64 ZZ + +syn keyword fortressOperator println + +syn keyword fortressKeyword opr for private asif throw + +syn match fortressThenErr "\" +syn match fortressCaseErr "\" +syn match fortressCatchErr "\" +syn match fortressTypecaseErr "\" + +syn region fortressNone matchgroup=fortressKeyword start="\" matchgroup=fortressKeyword end="\" contains=ALLBUT,fortressThenErr nextgroup=fortressIf +syn region fortressIf matchgroup=fortressKeyword start="\" matchgroup=fortressKeyword end="\" contains=ALLBUT,fortressThenErr nextgroup=fortressIf +syn region fortressIf matchgroup=fortressKeyword start="\" matchgroup=fortressKeyword end="\" contains=ALLBUT,fortressThenErr + +syn region fortressNone matchgroup=fortressKeyword start="\" matchgroup=fortressKeyword end="\" contains=ALLBUT,fortressCaseErr nextgroup=fortressCase +syn region fortressCase matchgroup=fortressKeyword start="\" matchgroup=fortressKeyword end="\" contains=ALLBUT,fortressCaseErr + +syn region fortressNone matchgroup=fortressKeyword start="\" matchgroup=fortressKeyword end="\" contains=ALLBUT,fortressTypecaseErr nextgroup=fortressTypecase +syn region fortressTypecase matchgroup=fortressKeyword start="\" matchgroup=fortressKeyword end="\" contains=ALLBUT,fortressEndErr + +syn region fortressNone matchgroup=fortressKeyword start="\" matchgroup=fortressKeyword end="\" contains=ALLBUT,fortressCatchErr nextgroup=fortressCatch +syn region fortressCatch matchgroup=fortressKeyword start="\" matchgroup=fortressKeyword end="\" contains=ALLBUT,fortressEndErr + +syn region fortressNone matchgroup=fortressKeyword start="\" matchgroup=fortressKeyword end="\" contains=ALLBUT,fortressEndErr + +syn region fortressApi matchgroup=fortressModule start="\" matchgroup=fortressModule end="\" contains=ALLBUT,fortressEndErr +syn region fortressObject matchgroup=fortressModule start="\" matchgroup=fortressModule end="\" contains=ALLBUT,fortressEndErr +syn region fortressTrait matchgroup=fortressModule start="\" matchgroup=fortressModule end="\" contains=ALLBUT,fortressEndErr +syn region fortressComponent matchgroup=fortressModule start="\" matchgroup=fortressModule end="\" contains=ALLBUT,fortressEndErr + +if version >= 508 || !exists("did_fortress_syntax_inits") + if version < 508 + let did_fortress_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink fortressComment Comment + HiLink fortressLineComment Comment + HiLink fortressKeyword Keyword + HiLink fortressExternal Include + HiLink fortressType Type + HiLink fortressOperator Operator + HiLink fortressEnd Statement + + HiLink fortressString String + HiLink fortressChar String + HiLink fortressNumber Number + + HiLink fortressThenErr Error + + delcommand HiLink +endif + +let b:current_syntax = "fortress" -- cgit v1.2.3