citadel

My dotfiles, scripts and nix configs
git clone git://jb55.com/citadel
Log | Files | Refs | README | LICENSE

swig.vim (1213B)


      1 " Vim syntax file
      2 " Language:	SWIG
      3 " Maintainer:	Roman Stanchak (rstanchak@yahoo.com)
      4 " Last Change:	2006 July 25
      5 
      6 " For version 5.x: Clear all syntax items
      7 " For version 6.x: Quit when a syntax file was already loaded
      8 if version < 600
      9   syntax clear
     10 elseif exists("b:current_syntax")
     11   finish
     12 endif
     13 
     14 " Read the C++ syntax to start with
     15 if version < 600
     16   so <sfile>:p:h/cpp.vim
     17 else
     18   runtime! syntax/cpp.vim
     19   unlet b:current_syntax
     20 endif
     21 
     22 " SWIG extentions
     23 syn keyword swigDirective %typemap %define %apply %fragment %include %enddef %extend %newobject %name 
     24 syn keyword swigDirective %rename %ignore %keyword %typemap %define %apply %fragment %include 
     25 syn keyword swigDirective %enddef %extend %newobject %name %rename %ignore %template %module %constant
     26 syn match swigDirective "%\({\|}\)"
     27 syn match swigUserDef "%[-_a-zA-Z0-9]\+"
     28 
     29 " Default highlighting
     30 if version >= 508 || !exists("did_swig_syntax_inits")
     31   if version < 508
     32     let did_cpp_syntax_inits = 1
     33     command -nargs=+ HiLink hi link <args>
     34   else
     35     command -nargs=+ HiLink hi def link <args>
     36   endif
     37   HiLink swigDirective      Exception 
     38   HiLink swigUserDef 		PreProc
     39   delcommand HiLink
     40 endif
     41 
     42 let b:current_syntax = "swig"
     43 
     44 " vim: ts=8