diff options
author | Bram Moolenaar <Bram@vim.org> | 2004-06-13 20:20:40 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2004-06-13 20:20:40 +0000 |
commit | 071d4279d6ab81b7187b48f3a0fc61e587b6db6c (patch) | |
tree | 221cbe3c40e043163c06f61c52a7ba2eb41e12ce /runtime/syntax/kwt.vim | |
parent | b4210b3bc14e2918f153a7307530fbe6eba659e1 (diff) | |
download | vim-071d4279d6ab81b7187b48f3a0fc61e587b6db6c.zip |
updated for version 7.0001
Diffstat (limited to 'runtime/syntax/kwt.vim')
-rw-r--r-- | runtime/syntax/kwt.vim | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/runtime/syntax/kwt.vim b/runtime/syntax/kwt.vim new file mode 100644 index 000000000..47be7a804 --- /dev/null +++ b/runtime/syntax/kwt.vim @@ -0,0 +1,87 @@ +" Vim syntax file +" Language: kimwitu++ +" Maintainer: Michael Piefel <piefel@informatik.hu-berlin.de> +" Last Change: 2 May 2001 + +" 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 + +" Read the C++ syntax to start with +if version < 600 + source <sfile>:p:h/cpp.vim +else + runtime! syntax/cpp.vim + unlet b:current_syntax +endif + +" kimwitu++ extentions + +" Don't stop at eol, messes around with CPP mode, but gives line spanning +" strings in unparse rules +syn region cCppString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat +syn keyword cType integer real casestring nocasestring voidptr list +syn keyword cType uview rview uview_enum rview_enum + +" avoid unparsing rule sth:view being scanned as label +syn clear cUserCont +syn match cUserCont "^\s*\I\i*\s*:$" contains=cUserLabel contained +syn match cUserCont ";\s*\I\i*\s*:$" contains=cUserLabel contained +syn match cUserCont "^\s*\I\i*\s*:[^:]"me=e-1 contains=cUserLabel contained +syn match cUserCont ";\s*\I\i*\s*:[^:]"me=e-1 contains=cUserLabel contained + +" highlight phylum decls +syn match kwtPhylum "^\I\i*:$" +syn match kwtPhylum "^\I\i*\s*{\s*\(!\|\I\)\i*\s*}\s*:$" + +syn keyword kwtStatement with foreach afterforeach provided +syn match kwtDecl "%\(uviewvar\|rviewvar\)" +syn match kwtDecl "^%\(uview\|rview\|ctor\|dtor\|base\|storageclass\|list\|attr\|member\|option\)" +syn match kwtOption "no-csgio\|no-unparse\|no-rewrite\|no-printdot\|no-hashtables\|smart-pointer\|weak-pointer" +syn match kwtSep "^%}$" +syn match kwtSep "^%{\(\s\+\I\i*\)*$" +syn match kwtCast "\<phylum_cast\s*<"me=e-1 +syn match kwtCast "\<phylum_cast\s*$" + + +" match views, remove paren error in brackets +syn clear cErrInBracket +syn match cErrInBracket contained ")" +syn match kwtViews "\(\[\|<\)\@<=[ [:alnum:]_]\{-}:" + +" match rule bodies +syn region kwtUnpBody transparent keepend extend fold start="->\s*\[" start="^\s*\[" skip="\$\@<!{\_.\{-}\$\@<!}" end="\s]\s\=;\=$" end="^]\s\=;\=$" end="}]\s\=;\=$" +syn region kwtRewBody transparent keepend extend fold start="->\s*<" start="^\s*<" end="\s>\s\=;\=$" end="^>\s\=;\=$" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_kwt_syn_inits") + if version < 508 + let did_kwt_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink kwtStatement cppStatement + HiLink kwtDecl cppStatement + HiLink kwtCast cppStatement + HiLink kwtSep Delimiter + HiLink kwtViews Label + HiLink kwtPhylum Type + HiLink kwtOption PreProc + "HiLink cText Comment + + delcommand HiLink +endif + +syn sync lines=300 + +let b:current_syntax = "kwt" + +" vim: ts=8 |