summaryrefslogtreecommitdiff
path: root/.vim/syntax/swig.vim
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2009-10-07 17:05:19 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2009-10-07 17:05:19 +0200
commitdd5427baaf49f8de4355abeb6bc8c6dd14f74e25 (patch)
tree46fcfc70bd792e80ceebaab89a7f8fc06bc29101 /.vim/syntax/swig.vim
downloaddotfiles-dd5427baaf49f8de4355abeb6bc8c6dd14f74e25.tar.gz
dotfiles-dd5427baaf49f8de4355abeb6bc8c6dd14f74e25.tar.bz2
dotfiles-dd5427baaf49f8de4355abeb6bc8c6dd14f74e25.zip
Initial check-in of files
Diffstat (limited to '')
-rw-r--r--.vim/syntax/swig.vim44
1 files changed, 44 insertions, 0 deletions
diff --git a/.vim/syntax/swig.vim b/.vim/syntax/swig.vim
new file mode 100644
index 0000000..90666c8
--- /dev/null
+++ b/.vim/syntax/swig.vim
@@ -0,0 +1,44 @@
+" Vim syntax file
+" Language: SWIG
+" Maintainer: Roman Stanchak (rstanchak@yahoo.com)
+" Last Change: 2006 July 25
+
+" 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
+ so <sfile>:p:h/cpp.vim
+else
+ runtime! syntax/cpp.vim
+ unlet b:current_syntax
+endif
+
+" SWIG extentions
+syn keyword swigDirective %typemap %define %apply %fragment %include %enddef %extend %newobject %name
+syn keyword swigDirective %rename %ignore %keyword %typemap %define %apply %fragment %include
+syn keyword swigDirective %enddef %extend %newobject %name %rename %ignore %template %module %constant
+syn match swigDirective "%\({\|}\)"
+syn match swigUserDef "%[-_a-zA-Z0-9]\+"
+
+" Default highlighting
+if version >= 508 || !exists("did_swig_syntax_inits")
+ if version < 508
+ let did_cpp_syntax_inits = 1
+ command -nargs=+ HiLink hi link <args>
+ else
+ command -nargs=+ HiLink hi def link <args>
+ endif
+ HiLink swigDirective Exception
+ HiLink swigUserDef PreProc
+ delcommand HiLink
+endif
+
+let b:current_syntax = "swig"
+
+" vim: ts=8