blob: 8891ebed6944ae2a39ab25955ed88b8977c3245a [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim syntax file
Bram Moolenaarec7944a2013-06-12 21:29:15 +02002" Language: Objective-C
3" Maintainer: Kazunobu Kuriyama <kazunobu.kuriyama@nifty.com>
4" Last Change: 2013 Jun 12
5" Remark: Modern Objective-C Edition
Bram Moolenaar071d4272004-06-13 20:20:40 +00006
Bram Moolenaarec7944a2013-06-12 21:29:15 +02007""" Preparation for loading ObjC stuff
8if exists("b:current_syntax")
Bram Moolenaar071d4272004-06-13 20:20:40 +00009 finish
10endif
Bram Moolenaarec7944a2013-06-12 21:29:15 +020011if &filetype != 'objcpp'
12 syn clear
13 runtime! syntax/c.vim
14endif
15let s:cpo_save = &cpo
Bram Moolenaar9a7224b2012-04-30 15:56:52 +020016set cpo&vim
Bram Moolenaar071d4272004-06-13 20:20:40 +000017
Bram Moolenaarec7944a2013-06-12 21:29:15 +020018""" ObjC proper stuff follows...
Bram Moolenaar071d4272004-06-13 20:20:40 +000019
Bram Moolenaarec7944a2013-06-12 21:29:15 +020020syn keyword objcPreProcMacro __OBJC__ __OBJC2__ __clang__
Bram Moolenaar071d4272004-06-13 20:20:40 +000021
Bram Moolenaarec7944a2013-06-12 21:29:15 +020022" Defined Types
23syn keyword objcPrincipalType id Class SEL IMP BOOL
24syn keyword objcUsefulTerm nil Nil NO YES
Bram Moolenaar071d4272004-06-13 20:20:40 +000025
Bram Moolenaarec7944a2013-06-12 21:29:15 +020026" Preprocessor Directives
27syn region objcImported display contained start=+"+ skip=+\\\\\|\\"+ end=+"+
28syn match objcImported display contained "<[^>]*>"
29syn match objcImport display "^\s*\(%:\|#\)\s*import\>\s*["<]" contains=objcImported
Bram Moolenaar071d4272004-06-13 20:20:40 +000030
Bram Moolenaarec7944a2013-06-12 21:29:15 +020031" ObjC Compiler Directives
32syn match objcObjDef display /@interface\>\|@implementation\>\|@end\>\|@class\>/
33syn match objcProtocol display /@protocol\>\|@optional\>\|@required\>/
34syn match objcProperty display /@property\>\|@synthesize\>\|@dynamic\>/
35syn match objcIvarScope display /@private\>\|@protected\>\|@public\>/
36syn match objcInternalRep display /@selector\>\|@encode\>/
37syn match objcException display /@try\>\|@throw\>\|@catch\|@finally\>/
38syn match objcThread display /@synchronized\>/
39syn match objcPool display /@autoreleasepool\>/
Bram Moolenaar071d4272004-06-13 20:20:40 +000040
Bram Moolenaarec7944a2013-06-12 21:29:15 +020041" ObjC Constant Strings
42syn match objcSpecial display contained "%@"
Bram Moolenaar071d4272004-06-13 20:20:40 +000043syn region objcString start=+\(@"\|"\)+ skip=+\\\\\|\\"+ end=+"+ contains=cFormat,cSpecial,objcSpecial
44
Bram Moolenaarec7944a2013-06-12 21:29:15 +020045" ObjC Hidden Arguments
46syn keyword objcHiddenArgument self _cmd super
47
48" ObjC Type Qualifiers for Blocks
49syn keyword objcBlocksQualifier __block
50" ObjC Type Qualifiers for Object Lifetime
51syn keyword objcObjectLifetimeQualifier __strong __weak __unsafe_unretained __autoreleasing
52" ObjC Type Qualifiers for Toll-Free Bridge
53syn keyword objcTollFreeBridgeQualifier __bridge __bridge_retained __bridge_transfer
54
55" ObjC Type Qualifiers for Remote Messaging
56syn match objcRemoteMessagingQualifier display contained /\((\s*oneway\s\+\|(\s*in\s\+\|(\s*out\s\+\|(\s*inout\s\+\|(\s*bycopy\s\+\(in\(out\)\?\|out\)\?\|(\s*byref\s\+\(in\(out\)\?\|out\)\?\)/hs=s+1
57
58" shorthand
59syn cluster objcTypeQualifier contains=objcBlocksQualifier,objcObjectLifetimeQualifier,objcTollFreeBridgeQualifier,objcRemoteMessagingQualifier
60
61" ObjC Fast Enumeration
62syn match objcFastEnumKeyword display /\sin\(\s\|$\)/
63
64" ObjC Literal Syntax
65syn match objcLiteralSyntaxNumber display /@\(YES\>\|NO\>\|\d\|-\|+\)/ contains=cNumber,cFloat,cOctal
66syn match objcLiteralSyntaxSpecialChar display /@'/ contains=cSpecialCharacter
67syn match objcLiteralSyntaxChar display /@'[^\\]'/
68syn match objcLiteralSyntaxOp display /@\((\|\[\|{\)/me=e-1,he=e-1
69
70" ObjC Declared Property Attributes
71syn match objDeclPropAccessorNameAssign display /\s*=\s*/ contained
72syn region objcDeclPropAccessorName display start=/\(getter\|setter\)/ end=/\h\w*/ contains=objDeclPropAccessorNameAssign
73syn keyword objcDeclPropAccessorType readonly readwrite contained
74syn keyword objcDeclPropAssignSemantics assign retain copy contained
75syn keyword objcDeclPropAtomicity nonatomic contained
76syn keyword objcDeclPropARC strong weak contained
77syn region objcDeclProp display transparent keepend start=/@property\s*(/ end=/)/ contains=objcProperty,objcDeclPropAccessorName,objcDeclPropAccessorType,objcDeclPropAssignSemantics,objcDeclPropAtomicity,objcDeclPropARC
78
79" To distinguish colons in methods and dictionaries from those in C's labels.
80syn match objcColon display /^\s*\h\w*\s*\:\(\s\|.\)/me=e-1,he=e-1
81
82" To distinguish a protocol list from system header files
83syn match objcProtocolList display /<\h\w*\(\s*,\s*\h\w*\)*>/ contains=objcPrincipalType,cType,Type
84
85" shorthand
86syn cluster objcCEntities contains=cType,cStructure,cStorageClass,cString,cCharacter,cSpecialCharacter,cNumbers,cConstant,cOperator,cComment,cCommentL,cStatement,cLabel,cConditional,cRepeat
87syn cluster objcObjCEntities contains=objcHiddenArgument,objcPrincipalType,objcString,objcUsefulTerm,objcProtocol,objcInternalRep,objcException,objcThread,objcPool,@objcTypeQualifier,objcLiteralSyntaxNumber,objcLiteralSyntaxOp,objcLiteralSyntaxChar,objcLiteralSyntaxSpecialChar,objcProtocolList,objcColon,objcFastEnumKeyword,objcType,objcClass,objcMacro,objcEnum,objcEnumValue,objcExceptionValue,objcNotificationValue,objcConstVar,objcPreProcMacro
88
Bram Moolenaar071d4272004-06-13 20:20:40 +000089" Objective-C Message Expressions
Bram Moolenaarec7944a2013-06-12 21:29:15 +020090syn region objcMethodCall start=/\[/ end=/\]/ contains=objcMethodCall,objcBlocks,@objcObjCEntities,@objcCEntities
Bram Moolenaar071d4272004-06-13 20:20:40 +000091
Bram Moolenaarec7944a2013-06-12 21:29:15 +020092" To distinguish class method and instance method
93syn match objcInstanceMethod display /^s*-\s*/
94syn match objcClassMethod display /^s*+\s*/
Bram Moolenaar071d4272004-06-13 20:20:40 +000095
Bram Moolenaarec7944a2013-06-12 21:29:15 +020096" ObjC Blocks
97syn region objcBlocks start=/\(\^\s*([^)]\+)\s*{\|\^\s*{\)/ end=/}/ contains=objcBlocks,objcMethodCall,@objcObjCEntities,@objcCEntities
Bram Moolenaar071d4272004-06-13 20:20:40 +000098
Bram Moolenaarec7944a2013-06-12 21:29:15 +020099syn cluster cParenGroup add=objcMethodCall
100syn cluster cPreProcGroup add=objcMethodCall
Bram Moolenaar071d4272004-06-13 20:20:40 +0000101
Bram Moolenaarec7944a2013-06-12 21:29:15 +0200102""" Foundation Framework
103syn match objcClass /Protocol\s*\*/me=s+8,he=s+8
Bram Moolenaar071d4272004-06-13 20:20:40 +0000104
Bram Moolenaarec7944a2013-06-12 21:29:15 +0200105"""""""""""""""""
106" NSObjCRuntime.h
107syn keyword objcType NSInteger NSUInteger NSComparator
108syn keyword objcEnum NSComparisonResult
109syn keyword objcEnumValue NSOrderedAscending NSOrderedSame NSOrderedDescending
110syn keyword objcEnum NSEnumerationOptions
111syn keyword objcEnumValue NSEnumerationConcurrent NSEnumerationReverse
112syn keyword objcEnum NSSortOptions
113syn keyword objcEnumValue NSSortConcurrent NSSortStable
114syn keyword objcEnumValue NSNotFound
115syn keyword objcMacro NSIntegerMax NSIntegerMin NSUIntegerMax
116" NSRange.h
117syn keyword objcType NSRange NSRangePointer
118" NSGeometry.h
119syn keyword objcType NSPoint NSPointPointer NSPointArray NSSize NSSizePointer NSSizeArray NSRect NSRectPointer NSRectArray
120syn keyword objcEnum NSRectEdge
121syn keyword objcEnumValue NSMinXEdge NSMinYEdge NSMaxXEdge NSMaxYEdge
122syn keyword objcConstVar NSZeroPoint NSZeroSize NSZeroRect
123syn keyword cType CGFloat CGPoint CGSize CGRect
124syn keyword objcEnum NSAlignmentOptions
125syn keyword objcEnumValue NSAlignMinXInward NSAlignMinYInward NSAlignMaxXInward NSAlignMaxYInward NSAlignWidthInward NSAlignHeightInward NSAlignMinXOutward NSAlignMinYOutward NSAlignMaxXOutward NSAlignMaxYOutward NSAlignWidthOutward NSAlignHeightOutward NSAlignMinXNearest NSAlignMinYNearest NSAlignMaxXNearest NSAlignMaxYNearest NSAlignWidthNearest NSAlignHeightNearest NSAlignRectFlipped NSAlignAllEdgesInward NSAlignAllEdgesOutward NSAlignAllEdgesNearest
126" NSDecimal.h
127syn keyword objcType NSDecimal
128syn keyword objcEnum NSRoundingMode
129syn keyword objcEnumValue NSRoundPlain NSRoundDown NSRoundUp NSRoundBankers
130syn keyword objcEnum NSCalculationError
131syn keyword objcEnumValue NSCalculationNoError NSCalculationLossOfPrecision NSCalculationUnderflow NSCalculationOverflow NSCalculationDivideByZero
132" NSDate.h
133syn match objcClass /NSDate\s*\*/me=s+6,he=s+6
134syn keyword objcType NSTimeInterval
135syn keyword objcNotificationValue NSSystemClockDidChangeNotification
136syn keyword objcMacro NSTimeIntervalSince1970
137" NSZone.h
138syn match objcType /NSZone\s*\*/me=s+6,he=s+6
139" NSError.h
140syn match objcClass /NSError\s*\*/me=s+7,he=s+7
141syn keyword objcConstVar NSCocoaErrorDomain NSPOSIXErrorDomain NSOSStatusErrorDomain NSMachErrorDomain NSUnderlyingErrorKey NSLocalizedDescriptionKey NSLocalizedFailureReasonErrorKey NSLocalizedRecoverySuggestionErrorKey NSLocalizedRecoveryOptionsErrorKey NSRecoveryAttempterErrorKey NSHelpAnchorErrorKey NSStringEncodingErrorKey NSURLErrorKey NSFilePathErrorKey
142" NSException.h
143syn match objcClass /NSException\s*\*/me=s+11,he=s+11
144syn keyword objcType NSUncaughtExceptionHandler
145syn keyword objcConstVar NSGenericException NSRangeException NSInvalidArgumentException NSInternalInconsistencyException NSMallocException NSObjectInaccessibleException NSObjectNotAvailableException NSDestinationInvalidException NSPortTimeoutException NSInvalidSendPortException NSInvalidReceivePortException NSPortSendException NSPortReceiveException NSOldStyleException
146" NSNotification.h
147syn match objcClass /NSNotification\s*\*/me=s+14,he=s+14
148syn match objcClass /NSNotificationCenter\s*\*/me=s+20,he=s+20
149" NSDistributedNotificationCenter.h
150syn match objcClass /NSDistributedNotificationCenter\s*\*/me=s+31,he=s+31
151syn keyword objcConstVar NSLocalNotificationCenterType
152syn keyword objcEnum NSNotificationSuspensionBehavior
153syn keyword objcEnumValue NSNotificationSuspensionBehaviorDrop NSNotificationSuspensionBehaviorCoalesce NSNotificationSuspensionBehaviorHold NSNotificationSuspensionBehaviorHold NSNotificationSuspensionBehaviorDeliverImmediately
154syn keyword objcEnumValue NSNotificationDeliverImmediately NSNotificationPostToAllSessions
155" NSNotificationQueue.h
156syn match objcClass /NSNotificationQueue\s*\*/me=s+19,he=s+19
157syn keyword objcEnum NSPostingStyle
158syn keyword objcEnumValue NSPostWhenIdle NSPostASAP NSPostNow
159syn keyword objcEnum NSNotificationCoalescing
160syn keyword objcEnumValue NSNotificationNoCoalescing NSNotificationCoalescingOnName NSNotificationCoalescingOnSender
161" NSEnumerator.h
162syn match objcClass /NSEnumerator\s*\*/me=s+12,he=s+12
163" NSIndexSet.h
164syn match objcClass /NSIndexSet\s*\*/me=s+10,he=s+10
165syn match objcClass /NSMutableIndexSet\s*\*/me=s+17,he=s+17
166" NSCharecterSet.h
167syn match objcClass /NSCharacterSet\s*\*/me=s+14,he=s+14
168" NSURL.h
169syn match objcClass /NSURL\s*\*/me=s+5,he=s+5
170syn keyword objcEnum NSURLBookmarkCreationOptions
171syn keyword objcEnumValue NSURLBookmarkCreationPreferFileIDResolution NSURLBookmarkCreationMinimalBookmark NSURLBookmarkCreationSuitableForBookmarkFile NSURLBookmarkCreationWithSecurityScope NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess
172syn keyword objcEnum NSURLBookmarkResolutionOptions
173syn keyword objcEnumValue NSURLBookmarkResolutionWithoutUI NSURLBookmarkResolutionWithoutMounting NSURLBookmarkResolutionWithSecurityScope
174syn keyword objcType NSURLBookmarkFileCreationOptions
175syn keyword objcConstVar NSURLFileScheme NSURLKeysOfUnsetValuesKey
176syn keyword objcConstVar NSURLNameKey NSURLLocalizedNameKey NSURLIsRegularFileKey NSURLIsDirectoryKey NSURLIsSymbolicLinkKey NSURLIsVolumeKey NSURLIsPackageKey NSURLIsSystemImmutableKey NSURLIsUserImmutableKey NSURLIsHiddenKey NSURLHasHiddenExtensionKey NSURLCreationDateKey NSURLContentAccessDateKey NSURLContentModificationDateKey NSURLAttributeModificationDateKey NSURLLinkCountKey NSURLParentDirectoryURLKey NSURLVolumeURLKey NSURLTypeIdentifierKey NSURLLocalizedTypeDescriptionKey NSURLLabelNumberKey NSURLLabelColorKey NSURLLocalizedLabelKey NSURLEffectiveIconKey NSURLCustomIconKey NSURLFileResourceIdentifierKey NSURLVolumeIdentifierKey NSURLPreferredIOBlockSizeKey NSURLIsReadableKey NSURLIsWritableKey NSURLIsExecutableKey NSURLFileSecurityKey NSURLIsExcludedFromBackupKey NSURLPathKey NSURLIsMountTriggerKey NSURLFileResourceTypeKey
177syn keyword objcConstVar NSURLFileResourceTypeNamedPipe NSURLFileResourceTypeCharacterSpecial NSURLFileResourceTypeDirectory NSURLFileResourceTypeBlockSpecial NSURLFileResourceTypeRegular NSURLFileResourceTypeSymbolicLink NSURLFileResourceTypeSocket NSURLFileResourceTypeUnknown
178syn keyword objcConstVar NSURLFileSizeKey NSURLFileAllocatedSizeKey NSURLTotalFileSizeKey NSURLTotalFileAllocatedSizeKey NSURLIsAliasFileKey
179syn keyword objcConstVar NSURLVolumeLocalizedFormatDescriptionKey NSURLVolumeTotalCapacityKey NSURLVolumeAvailableCapacityKey NSURLVolumeResourceCountKey NSURLVolumeSupportsPersistentIDsKey NSURLVolumeSupportsSymbolicLinksKey NSURLVolumeSupportsHardLinksKey NSURLVolumeSupportsJournalingKey NSURLVolumeIsJournalingKey NSURLVolumeSupportsSparseFilesKey NSURLVolumeSupportsZeroRunsKey NSURLVolumeSupportsCaseSensitiveNamesKey NSURLVolumeSupportsCasePreservedNamesKey NSURLVolumeSupportsRootDirectoryDatesKey NSURLVolumeSupportsVolumeSizesKey NSURLVolumeSupportsRenamingKey NSURLVolumeSupportsAdvisoryFileLockingKey NSURLVolumeSupportsExtendedSecurityKey NSURLVolumeIsBrowsableKey NSURLVolumeMaximumFileSizeKey NSURLVolumeIsEjectableKey NSURLVolumeIsRemovableKey NSURLVolumeIsInternalKey NSURLVolumeIsAutomountedKey NSURLVolumeIsLocalKey NSURLVolumeIsReadOnlyKey NSURLVolumeCreationDateKey NSURLVolumeURLForRemountingKey NSURLVolumeUUIDStringKey NSURLVolumeNameKey NSURLVolumeLocalizedNameKey
180syn keyword objcConstVar NSURLIsUbiquitousItemKey NSURLUbiquitousItemHasUnresolvedConflictsKey NSURLUbiquitousItemIsDownloadedKey NSURLUbiquitousItemIsDownloadingKey NSURLUbiquitousItemIsUploadedKey NSURLUbiquitousItemIsUploadingKey NSURLUbiquitousItemPercentDownloadedKey NSURLUbiquitousItemPercentUploadedKey
181""""""""""""
182" NSString.h
183syn match objcClass /NSString\s*\*/me=s+8,he=s+8
184syn match objcClass /NSMutableString\s*\*/me=s+15,he=s+15
185syn keyword objcType unichar
186syn keyword objcExceptionValue NSParseErrorException NSCharacterConversionException
187syn keyword objcMacro NSMaximumStringLength
188syn keyword objcEnum NSStringCompareOptions
189syn keyword objcEnumValue NSCaseInsensitiveSearch NSLiteralSearch NSBackwardsSearch NSAnchoredSearch NSNumericSearch NSDiacriticInsensitiveSearch NSWidthInsensitiveSearch NSForcedOrderingSearch NSRegularExpressionSearch
190syn keyword objcEnum NSStringEncoding
191syn keyword objcEnumValue NSASCIIStringEncoding NSNEXTSTEPStringEncoding NSJapaneseEUCStringEncoding NSUTF8StringEncoding NSISOLatin1StringEncoding NSSymbolStringEncoding NSNonLossyASCIIStringEncoding NSShiftJISStringEncoding NSISOLatin2StringEncoding NSUnicodeStringEncoding NSWindowsCP1251StringEncoding NSWindowsCP1252StringEncoding NSWindowsCP1253StringEncoding NSWindowsCP1254StringEncoding NSWindowsCP1250StringEncoding NSISO2022JPStringEncoding NSMacOSRomanStringEncoding NSUTF16StringEncoding NSUTF16BigEndianStringEncoding NSUTF16LittleEndianStringEncoding NSUTF32StringEncoding NSUTF32BigEndianStringEncoding NSUTF32LittleEndianStringEncoding
192syn keyword objcEnum NSStringEncodingConversionOptions
193syn keyword objcEnumValue NSStringEncodingConversionAllowLossy NSStringEncodingConversionExternalRepresentation
194syn keyword objcEnum NSStringEnumerationOptions
195syn keyword objcEnumValue NSStringEnumerationByLines NSStringEnumerationByParagraphs NSStringEnumerationByComposedCharacterSequences NSStringEnumerationByWords NSStringEnumerationBySentences NSStringEnumerationReverse NSStringEnumerationSubstringNotRequired NSStringEnumerationLocalized
196" NSAttributedString.h
197syn match objcClass /NSAttributedString\s*\*/me=s+18,he=s+18
198syn match objcClass /NSMutableAttributedString\s*\*/me=s+25,he=s+25
199syn keyword objcEnum NSAttributedStringEnumerationOptions
200syn keyword objcEnumValue NSAttributedStringEnumerationReverse NSAttributedStringEnumerationLongestEffectiveRangeNotRequired
201" NSValue.h
202syn match objcClass /NSValue\s*\*/me=s+7,he=s+7
203syn match objcClass /NSNumber\s*\*/me=s+8,he=s+8
204" NSDecimalNumber.h
205syn match objcClass /NSDecimalNumber\s*\*/me=s+15,he=s+15
206syn match objcClass /NSDecimalNumberHandler\s*\*/me=s+22,he=s+22
207syn keyword objcExceptionValue NSDecimalNumberExactnessException NSDecimalNumberOverflowException NSDecimalNumberUnderflowException NSDecimalNumberDivideByZeroException
208" NSData.h
209syn match objcClass /NSData\s*\*/me=s+6,he=s+6
210syn match objcClass /NSMutableData\s*\*/me=s+13,he=s+13
211syn keyword objcEnum NSDataReadingOptions
212syn keyword objcEnumValue NSDataReadingMappedIfSafe NSDataReadingUncached NSDataReadingMappedAlways NSDataReadingMapped NSMappedRead NSUncachedRead
213syn keyword objcEnum NSDataWritingOptions
214syn keyword objcEnumValue NSDataWritingAtomic NSDataWritingWithoutOverwriting NSDataWritingFileProtectionNone NSDataWritingFileProtectionComplete NSDataWritingFileProtectionCompleteUnlessOpen NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication NSDataWritingFileProtectionMask NSAtomicWrite
215syn keyword objcEnum NSDataSearchOptions
216syn keyword objcEnumValue NSDataSearchBackwards NSDataSearchAnchored
217" NSArray.h
218syn match objcClass /NSArray\s*\*/me=s+7,he=s+7
219syn match objcClass /NSMutableArray\s*\*/me=s+14,he=s+14
220syn keyword objcEnum NSBinarySearchingOptions
221syn keyword objcEnumValue NSBinarySearchingFirstEqual NSBinarySearchingLastEqual NSBinarySearchingInsertionIndex
222" NSDictionary.h
223syn match objcClass /NSDictionary\s*\*/me=s+12,he=s+12
224syn match objcClass /NSMutableDictionary\s*\*/me=s+19,he=s+19
225" NSSet.h
226syn match objcClass /NSSet\s*\*/me=s+5,me=s+5
227syn match objcClass /NSMutableSet\s*\*/me=s+12,me=s+12
228syn match objcClass /NSCountedSet\s*\*/me=s+12,me=s+12
229" NSOrderedSet.h
230syn match objcClass /NSOrderedSet\s*\*/me=s+12,me=s+12
231syn match objcClass /NSMutableOrderedSet\s*\*/me=s+19,me=s+19
232"""""""""""""""""""
233" NSPathUtilities.h
234syn keyword objcEnum NSSearchPathDirectory
235syn keyword objcEnumValue NSApplicationDirectory NSDemoApplicationDirectory NSDeveloperApplicationDirectory NSAdminApplicationDirectory NSLibraryDirectory NSDeveloperDirectory NSUserDirectory NSDocumentationDirectory NSDocumentDirectory NSCoreServiceDirectory NSAutosavedInformationDirectory NSDesktopDirectory NSCachesDirectory NSApplicationSupportDirectory NSDownloadsDirectory NSInputMethodsDirectory NSMoviesDirectory NSMusicDirectory NSPicturesDirectory NSPrinterDescriptionDirectory NSSharedPublicDirectory NSPreferencePanesDirectory NSApplicationScriptsDirectory NSItemReplacementDirectory NSAllApplicationsDirectory NSAllLibrariesDirectory NSTrashDirectory
236syn keyword objcEnum NSSearchPathDomainMask
237syn keyword objcEnumValue NSUserDomainMask NSLocalDomainMask NSNetworkDomainMask NSSystemDomainMask NSAllDomainsMask
238" NSFileManger.h
239syn match objcClass /NSFileManager\s*\*/me=s+13,he=s+13
240syn match objcClass /NSDirectoryEnumerator\s*\*/me=s+21,he=s+21
241syn keyword objcEnum NSVolumeEnumerationOptions
242syn keyword objcEnumValue NSVolumeEnumerationSkipHiddenVolumes NSVolumeEnumerationProduceFileReferenceURLs
243syn keyword objcEnum NSDirectoryEnumerationOptions
244syn keyword objcEnumValue NSDirectoryEnumerationSkipsSubdirectoryDescendants NSDirectoryEnumerationSkipsPackageDescendants NSDirectoryEnumerationSkipsHiddenFiles
245syn keyword objcEnum NSFileManagerItemReplacementOptions
246syn keyword objcEnumValue NSFileManagerItemReplacementUsingNewMetadataOnly NSFileManagerItemReplacementWithoutDeletingBackupItem
247syn keyword objcNotificationValue NSUbiquityIdentityDidChangeNotification
248syn keyword objcConstVar NSFileType NSFileTypeDirectory NSFileTypeRegular NSFileTypeSymbolicLink NSFileTypeSocket NSFileTypeCharacterSpecial NSFileTypeBlockSpecial NSFileTypeUnknown NSFileSize NSFileModificationDate NSFileReferenceCount NSFileDeviceIdentifier NSFileOwnerAccountName NSFileGroupOwnerAccountName NSFilePosixPermissions NSFileSystemNumber NSFileSystemFileNumber NSFileExtensionHidden NSFileHFSCreatorCode NSFileHFSTypeCode NSFileImmutable NSFileAppendOnly NSFileCreationDate NSFileOwnerAccountID NSFileGroupOwnerAccountID NSFileBusy NSFileProtectionKey NSFileProtectionNone NSFileProtectionComplete NSFileProtectionCompleteUnlessOpen NSFileProtectionCompleteUntilFirstUserAuthentication NSFileSystemSize NSFileSystemFreeSize NSFileSystemNodes NSFileSystemFreeNodes
249" NSFileHandle.h
250syn match objcClass /NSFileHandle\s*\*/me=s+12,he=s+12
251syn keyword objcExceptionValue NSFileHandleOperationException
252syn keyword objcNotificationValue NSFileHandleReadCompletionNotification NSFileHandleReadToEndOfFileCompletionNotification NSFileHandleConnectionAcceptedNotification NSFileHandleDataAvailableNotification NSFileHandleNotificationDataItem NSFileHandleNotificationFileHandleItem NSFileHandleNotificationMonitorModes
253syn match objcClass /NSPipe\s*\*/me=s+6,he=s+6
254""""""""""""
255" NSLocale.h
256syn match objcClass /NSLocale\s*\*/me=s+8,he=s+8
257syn keyword objcEnum NSLocaleLanguageDirection
258syn keyword objcEnumValue NSLocaleLanguageDirectionUnknown NSLocaleLanguageDirectionLeftToRight NSLocaleLanguageDirectionRightToLeft NSLocaleLanguageDirectionTopToBottom NSLocaleLanguageDirectionBottomToTop
259syn keyword objcNotificationValue NSCurrentLocaleDidChangeNotification
260syn keyword objcConstVar NSLocaleIdentifier NSLocaleLanguageCode NSLocaleCountryCode NSLocaleScriptCode NSLocaleVariantCode NSLocaleExemplarCharacterSet NSLocaleCalendar NSLocaleCollationIdentifier NSLocaleUsesMetricSystem NSLocaleMeasurementSystem NSLocaleDecimalSeparator NSLocaleGroupingSeparator NSLocaleCurrencySymbol NSLocaleCurrencyCode NSLocaleCollatorIdentifier NSLocaleQuotationBeginDelimiterKey NSLocaleQuotationEndDelimiterKey NSLocaleAlternateQuotationBeginDelimiterKey NSLocaleAlternateQuotationEndDelimiterKey NSGregorianCalendar NSBuddhistCalendar NSChineseCalendar NSHebrewCalendar NSIslamicCalendar NSIslamicCivilCalendar NSJapaneseCalendar NSRepublicOfChinaCalendar NSPersianCalendar NSIndianCalendar NSISO8601Calendar
261" NSFormatter.h
262syn match objcClass /NSFormatter\s*\*/me=s+11,he=s+11
263" NSNumberFormatter.h
264syn match objcClass /NSNumberFormatter\s*\*/me=s+17,he=s+17
265syn keyword objcEnum NSNumberFormatterStyle
266syn keyword objcEnumValue NSNumberFormatterNoStyle NSNumberFormatterDecimalStyle NSNumberFormatterCurrencyStyle NSNumberFormatterPercentStyle NSNumberFormatterScientificStyle NSNumberFormatterSpellOutStyle
267syn keyword objcEnum NSNumberFormatterBehavior
268syn keyword objcEnumValue NSNumberFormatterBehaviorDefault NSNumberFormatterBehavior10_0 NSNumberFormatterBehavior10_4
269syn keyword objcEnum NSNumberFormatterPadPosition
270syn keyword objcEnumValue NSNumberFormatterPadBeforePrefix NSNumberFormatterPadAfterPrefix NSNumberFormatterPadBeforeSuffix NSNumberFormatterPadAfterSuffix
271syn keyword objcEnum NSNumberFormatterRoundingMode
272syn keyword objcEnumValue NSNumberFormatterRoundCeiling NSNumberFormatterRoundFloor NSNumberFormatterRoundDown NSNumberFormatterRoundUp NSNumberFormatterRoundHalfEven NSNumberFormatterRoundHalfDown NSNumberFormatterRoundHalfUp
273" NSDateFormatter.h
274syn match objcClass /NSDateFormatter\s*\*/me=s+15,he=s+15
275syn keyword objcEnum NSDateFormatterStyle
276syn keyword objcEnumValue NSDateFormatterNoStyle NSDateFormatterShortStyle NSDateFormatterMediumStyle NSDateFormatterLongStyle NSDateFormatterFullStyle
277syn keyword objcEnum NSDateFormatterBehavior
278syn keyword objcEnumValue NSDateFormatterBehaviorDefault NSDateFormatterBehavior10_0 NSDateFormatterBehavior10_4
279" NSCalendar.h
280syn match objcClass /NSCalendar\s*\*/me=s+10,he=s+10
281syn keyword objcEnum NSCalendarUnit
282syn keyword objcEnumValue NSEraCalendarUnit NSYearCalendarUnit NSMonthCalendarUnit NSDayCalendarUnit NSHourCalendarUnit NSMinuteCalendarUnit NSSecondCalendarUnit NSWeekCalendarUnit NSWeekdayCalendarUnit NSWeekdayOrdinalCalendarUnit NSQuarterCalendarUnit NSWeekOfMonthCalendarUnit NSWeekOfYearCalendarUnit NSYearForWeekOfYearCalendarUnit NSCalendarCalendarUnit NSTimeZoneCalendarUnit
283syn keyword objcEnumValue NSWrapCalendarComponents NSUndefinedDateComponent
284syn match objcClass /NSDateComponents\s*\*/me=s+16,he=s+16
285" NSTimeZone.h
286syn match objcClass /NSTimeZone\s*\*/me=s+10,he=s+10
287syn keyword objcEnum NSTimeZoneNameStyle
288syn keyword objcEnumValue NSTimeZoneNameStyleStandard NSTimeZoneNameStyleShortStandard NSTimeZoneNameStyleDaylightSaving NSTimeZoneNameStyleShortDaylightSaving NSTimeZoneNameStyleGeneric NSTimeZoneNameStyleShortGeneric
289syn keyword objcNotificationValue NSSystemTimeZoneDidChangeNotification
290"""""""""""
291" NSCoder.h
292syn match objcClass /NSCoder\s*\*/me=s+7,he=s+7
293" NSArchiver.h
294syn match objcClass /NSArchiver\s*\*/me=s+10,he=s+10
295syn match objcClass /NSUnarchiver\s*\*/me=s+12,he=s+12
296syn keyword objcExceptionValue NSInconsistentArchiveException
297" NSKeyedArchiver.h
298syn match objcClass /NSKeyedArchiver\s*\*/me=s+15,he=s+15
299syn match objcClass /NSKeyedUnarchiver\s*\*/me=s+17,he=s+17
300syn keyword objcExceptionValue NSInvalidArchiveOperationException NSInvalidUnarchiveOperationException
301""""""""""""""""""
302" NSPropertyList.h
303syn keyword objcEnum NSPropertyListMutabilityOptions
304syn keyword objcEnumValue NSPropertyListImmutable NSPropertyListMutableContainers NSPropertyListMutableContainersAndLeaves
305syn keyword objcEnum NSPropertyListFormat
306syn keyword objcEnumValue NSPropertyListOpenStepFormat NSPropertyListXMLFormat_v1_0 NSPropertyListBinaryFormat_v1_0
307syn keyword objcType NSPropertyListReadOptions NSPropertyListWriteOptions
308" NSUserDefaults.h
309syn match objcClass /NSUserDefaults\s*\*/me=s+14,he=s+14
310syn keyword objcConstVar NSGlobalDomain NSArgumentDomain NSRegistrationDomain
311syn keyword objcNotificationValue NSUserDefaultsDidChangeNotification
312" NSBundle.h
313syn match objcClass /NSBundle\s*\*/me=s+8,he=s+8
314syn keyword objcEnumValue NSBundleExecutableArchitectureI386 NSBundleExecutableArchitecturePPC NSBundleExecutableArchitectureX86_64 NSBundleExecutableArchitecturePPC64
315syn keyword objcNotificationValue NSBundleDidLoadNotification NSLoadedClasses
316"""""""""""""""""
317" NSProcessInfo.h
318syn match objcClass /NSProcessInfo\s*\*/me=s+13,he=s+13
319syn keyword objcEnumValue NSWindowsNTOperatingSystem NSWindows95OperatingSystem NSSolarisOperatingSystem NSHPUXOperatingSystem NSMACHOperatingSystem NSSunOSOperatingSystem NSOSF1OperatingSystem
320" NSTask.h
321syn match objcClass /NSTask\s*\*/me=s+6,he=s+6
322syn keyword objcEnum NSTaskTerminationReason
323syn keyword objcEnumValue NSTaskTerminationReasonExit NSTaskTerminationReasonUncaughtSignal
324syn keyword objcNotificationValue NSTaskDidTerminateNotification
325" NSThread.h
326syn match objcClass /NSThread\s*\*/me=s+8,he=s+8
327syn keyword objcNotificationValue NSWillBecomeMultiThreadedNotification NSDidBecomeSingleThreadedNotification NSThreadWillExitNotification
328" NSLock.h
329syn match objcClass /NSLock\s*\*/me=s+6,he=s+6
330syn match objcClass /NSConditionLock\s*\*/me=s+15,he=s+15
331syn match objcClass /NSRecursiveLock\s*\*/me=s+15,he=s+15
332" NSDictributedLock
333syn match objcClass /NSDistributedLock\s*\*/me=s+17,he=s+17
334" NSOperation.h
335""""""""""""""""
336syn match objcClass /NSOperation\s*\*/me=s+11,he=s+11
337syn keyword objcEnum NSOperationQueuePriority
338syn keyword objcEnumValue NSOperationQueuePriorityVeryLow NSOperationQueuePriorityLow NSOperationQueuePriorityNormal NSOperationQueuePriorityHigh NSOperationQueuePriorityVeryHigh
339syn match objcClass /NSBlockOperation\s*\*/me=s+16,he=s+16
340syn match objcClass /NSInvocationOperation\s*\*/me=s+21,he=s+21
341syn keyword objcExceptionValue NSInvocationOperationVoidResultException NSInvocationOperationCancelledException
342syn match objcClass /NSOperationQueue\s*\*/me=s+16,he=s+16
343syn keyword objcEnumValue NSOperationQueueDefaultMaxConcurrentOperationCount
344" NSConnection.h
345syn match objcClass /NSConnection\s*\*/me=s+12,he=s+12
346syn keyword objcConstVar NSConnectionReplyMode
347syn keyword objcNotificationValue NSConnectionDidDieNotification NSConnectionDidInitializeNotification
348syn keyword objcExceptionValue NSFailedAuthenticationException
349" NSPort.h
350syn match objcClass /NSPort\s*\*/me=s+6,he=s+6
351syn keyword objcType NSSocketNativeHandle
352syn keyword objcNotificationValue NSPortDidBecomeInvalidNotification
353syn match objcClass /NSMachPort\s*\*/me=s+10,he=s+10
354syn keyword objcEnumValue NSMachPortDeallocateNone NSMachPortDeallocateSendRight NSMachPortDeallocateReceiveRight
355syn match objcClass /NSMessagePort\s*\*/me=s+13,he=s+13
356syn match objcClass /NSSocketPort\s*\*/me=s+12,he=s+12
357" NSPortMessage.h
358syn match objcClass /NSPortMessage\s*\*/me=s+13,he=s+13
359" NSDistantObject.h
360syn match objcClass /NSDistantObject\s*\*/me=s+15,he=s+15
361" NSPortNameServer.h
362syn match objcClass /NSPortNameServer\s*\*/me=s+16,he=s+16
363syn match objcClass /NSMessagePortNameServer\s*\*/me=s+23,he=s+23
364syn match objcClass /NSSocketPortNameServer\s*\*/me=s+22,he=s+22
365" NSHost.h
366syn match objcClass /NSHost\s*\*/me=s+6,he=s+6
367" NSInvocation.h
368syn match objcClass /NSInvocation\s*\*/me=s+12,he=s+12
369" NSMethodSignature.h
370syn match objcClass /NSMethodSignature\s*\*/me=s+17,he=s+17
371"""""
372" NSScanner.h
373syn match objcClass /NSScanner\s*\*/me=s+9,he=s+9
374" NSTimer.h
375syn match objcClass /NSTimer\s*\*/me=s+7,he=s+7
376" NSAutoreleasePool.h
377syn match objcClass /NSAutoreleasePool\s*\*/me=s+17,he=s+17
378" NSRunLoop.h
379syn match objcClass /NSRunLoop\s*\*/me=s+9,he=s+9
380syn keyword objcConstVar NSDefaultRunLoopMode NSRunLoopCommonModes
381" NSNull.h
382syn match objcClass /NSNull\s*\*/me=s+6,he=s+6
383" NSProxy.h
384syn match objcClass /NSProxy\s*\*/me=s+7,he=s+7
385" NSObject.h
386syn match objcClass /NSObject\s*\*/me=s+8,he=s+8
387
388""" Default Highlighting
389hi def link objcPreProcMacro cConstant
390hi def link objcPrincipalType cType
391hi def link objcUsefulTerm cConstant
392hi def link objcImport cInclude
393hi def link objcImported cString
394hi def link objcObjDef cOperator
395hi def link objcProtocol cOperator
396hi def link objcProperty cOperator
397hi def link objcIvarScope cOperator
398hi def link objcInternalRep cOperator
399hi def link objcException cOperator
400hi def link objcThread cOperator
401hi def link objcPool cOperator
402hi def link objcSpecial cSpecial
403hi def link objcString cString
404hi def link objcHiddenArgument cStatement
405hi def link objcBlocksQualifier cStorageClass
406hi def link objcObjectLifetimeQualifier cStorageClass
407hi def link objcTollFreeBridgeQualifier cStorageClass
408hi def link objcRemoteMessagingQualifier cStorageClass
409hi def link objcFastEnumKeyword cStatement
410hi def link objcLiteralSyntaxNumber cNumber
411hi def link objcLiteralSyntaxChar cCharacter
412hi def link objcLiteralSyntaxSpecialChar cCharacter
413hi def link objcLiteralSyntaxOp cOperator
414hi def link objcDeclPropAccessorName cConstant
415hi def link objcDeclPropAccessorType cConstant
416hi def link objcDeclPropAssignSemantics cConstant
417hi def link objcDeclPropAtomicity cConstant
418hi def link objcDeclPropARC cConstant
419hi def link objcInstanceMethod Function
420hi def link objcClassMethod Function
421hi def link objcType cType
422hi def link objcClass cType
423hi def link objcMacro cConstant
424hi def link objcEnum cType
425hi def link objcEnumValue cConstant
426hi def link objcExceptionValue cConstant
427hi def link objcNotificationValue cConstant
428hi def link objcConstVar cConstant
429
430""" Final step
Bram Moolenaar071d4272004-06-13 20:20:40 +0000431let b:current_syntax = "objc"
Bram Moolenaarec7944a2013-06-12 21:29:15 +0200432let &cpo = s:cpo_save
433unlet s:cpo_save
Bram Moolenaar071d4272004-06-13 20:20:40 +0000434
Bram Moolenaarec7944a2013-06-12 21:29:15 +0200435" vim: ts=8 sw=2 sts=2