diff options
Diffstat (limited to 'runtime/syntax/eiffel.vim')
-rw-r--r-- | runtime/syntax/eiffel.vim | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/runtime/syntax/eiffel.vim b/runtime/syntax/eiffel.vim index e5bc69ada..a91f85d03 100644 --- a/runtime/syntax/eiffel.vim +++ b/runtime/syntax/eiffel.vim @@ -1,10 +1,10 @@ " Eiffel syntax file " Language: Eiffel -" Maintainer: Reimer Behrends <behrends@cse.msu.edu> -" With much input from Jocelyn Fiat <fiat@eiffel.com> -" See http://www.cse.msu.edu/~behrends/vim/ for the most current version. -" Last Change: 2011 Dec 31 by Thilo Six - +" Maintainer: Jocelyn Fiat <jfiat@eiffel.com> +" Previous maintainer: Reimer Behrends <behrends@cse.msu.edu> +" Contributions from: Thilo Six +" +" URL: https://github.com/eiffelhub/vim-eiffel " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if version < 600 @@ -13,7 +13,7 @@ elseif exists("b:current_syntax") finish endif -let s:cpo_save = &cpo +let s:keepcpo= &cpo set cpo&vim " Option handling @@ -43,7 +43,7 @@ endif " Keyword definitions -syn keyword eiffelTopStruct indexing feature creation inherit +syn keyword eiffelTopStruct note indexing feature creation inherit syn match eiffelTopStruct "\<class\>" syn match eiffelKeyword "\<end\>" syn match eiffelTopStruct "^end\>\(\s*--\s\+class\s\+\<[A-Z][A-Z0-9_]*\>\)\=" contains=eiffelClassName @@ -51,27 +51,30 @@ syn match eiffelBrackets "[[\]]" syn match eiffelBracketError "\]" syn region eiffelGeneric transparent matchgroup=eiffelBrackets start="\[" end="\]" contains=ALLBUT,eiffelBracketError,eiffelGenericDecl,eiffelStringError,eiffelStringEscape,eiffelGenericCreate,eiffelTopStruct if exists("eiffel_ise") + syn match eiffelAgent "\<agent\>" + syn match eiffelConvert "\<convert\>" syn match eiffelCreate "\<create\>" syn match eiffelTopStruct contained "\<create\>" + syn match eiffelTopStruct contained "\<convert\>" syn match eiffelGenericCreate contained "\<create\>" syn match eiffelTopStruct "^create\>" syn region eiffelGenericDecl transparent matchgroup=eiffelBrackets contained start="\[" end="\]" contains=ALLBUT,eiffelCreate,eiffelTopStruct,eiffelGeneric,eiffelBracketError,eiffelStringEscape,eiffelStringError,eiffelBrackets syn region eiffelClassHeader start="^class\>" end="$" contains=ALLBUT,eiffelCreate,eiffelGenericCreate,eiffelGeneric,eiffelStringEscape,eiffelStringError,eiffelBrackets endif -syn keyword eiffelDeclaration is do once deferred unique local -syn keyword eiffelDeclaration Unique +syn keyword eiffelDeclaration is do once deferred unique local attribute assign +syn keyword eiffelDeclaration attached detachable Unique syn keyword eiffelProperty expanded obsolete separate frozen syn keyword eiffelProperty prefix infix syn keyword eiffelInheritClause rename redefine undefine select export as syn keyword eiffelAll all -syn keyword eiffelKeyword external alias +syn keyword eiffelKeyword external alias some syn keyword eiffelStatement if else elseif inspect syn keyword eiffelStatement when then syn match eiffelAssertion "\<require\(\s\+else\)\=\>" syn match eiffelAssertion "\<ensure\(\s\+then\)\=\>" syn keyword eiffelAssertion check syn keyword eiffelDebug debug -syn keyword eiffelStatement from until loop +syn keyword eiffelStatement across from until loop syn keyword eiffelAssertion variant syn match eiffelAssertion "\<invariant\>" syn match eiffelTopStruct "^invariant\>" @@ -129,6 +132,11 @@ syn match eiffelClassName "\<[A-Z][A-Z0-9_]*\>" syn match eiffelParenError ")" syn region eiffelParen transparent start="(" end=")" contains=ALLBUT,eiffelParenError,eiffelStringError,eiffelStringEscape +if exists("eiffel_fold") +" setlocal foldmethod=indent +" syn sync fromstart +endif + " Should suffice for even very long strings and expressions syn sync lines=40 @@ -153,6 +161,8 @@ if version >= 508 || !exists("did_eiffel_syntax_inits") HiLink eiffelException Statement HiLink eiffelGenericCreate Statement + HiLink eiffelAgent Statement + HiLink eiffelConvert Statement HiLink eiffelTopStruct PreProc @@ -196,6 +206,7 @@ endif let b:current_syntax = "eiffel" -let &cpo = s:cpo_save -unlet s:cpo_save +let &cpo = s:keepcpo +unlet s:keepcpo + " vim: ts=8 |