" Vim syntax file
" Language:	Objective C
" Maintainer:	Valentino Kyriakides <1kyriaki@informatik.uni-hamburg.de>
" Last change:	1997 May 2

" Read the C syntax to start with
source <sfile>:p:h/c.vim

" Objective C extentions follow below
"
" NOTE: Objective C is abbreviated to ObjC/objc
" and uses *.h, *.m as file extensions!


" ObjC keywords, types, type qualifiers etc.
syntax keyword objcStatement	self super _cmd
syntax keyword objcType			id Class SEL IMP BOOL nil Nil
syntax keyword objcTypeModifier bycopy in out inout oneway

" Match the ObjC #import directive (like C's #include)
syntax region objcImported contained start=+"+  skip=+\\\\\|\\"+  end=+"+
syntax match  objcImported contained "<[^>]*>"
syntax match  objcImport  "^#[  ]*import\>[ 	]*["<]" contains objcImported

" Match the important ObjC directives
syntax match  objcScopeDecl "@public\|@private\|@protected"
syntax match  objcDirective	"@interface\|@implementation"
syntax match  objcDirective	"@class\|@end\|@defs"
syntax match  objcDirective	"@encode\|@protocol\|@selector"

" Match the ObjC method types
"
" NOTE: here I match only the indicators, this looks 
" much nicer and reduces cluttering color highlightings.
" However, if you prefer full method declaration matching
" append .* at the end of the next two patterns!
"
syntax match objcInstMethod  "^[\t\s]*-[\s]*"
syntax match objcFactMethod  "^[\t\s]*+[\s]*"


if !exists("did_objc_syntax_inits")
  let did_objc_syntax_inits = 1
  highlight link objcImport	Include
  highlight link objcImported	cString
  highlight link objcType	Type
  highlight link objcScopeDecl	Statement
  highlight link objcInstMethod	Function
  highlight link objcFactMethod	Function
  highlight link objcStatement	Statement
  highlight link objcDirective	Statement
endif
