Mercurial > vim
annotate runtime/syntax/objc.vim @ 6823:0303182665d5
Updated runtime files.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Tue, 09 Jun 2015 19:44:55 +0200 |
parents | 78c318784090 |
children | aea5ebf352c4 |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
4869 | 2 " Language: Objective-C |
3 " Maintainer: Kazunobu Kuriyama <kazunobu.kuriyama@nifty.com> | |
4911 | 4 " Last Change: 2013 Jun 13 |
4869 | 5 " Remark: Modern Objective-C Edition |
7 | 6 |
4869 | 7 """ Preparation for loading ObjC stuff |
8 if exists("b:current_syntax") | |
7 | 9 finish |
10 endif | |
4869 | 11 if &filetype != 'objcpp' |
12 syn clear | |
13 runtime! syntax/c.vim | |
14 endif | |
15 let s:cpo_save = &cpo | |
3496
d1e4abe8342c
Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents:
1121
diff
changeset
|
16 set cpo&vim |
7 | 17 |
4869 | 18 """ ObjC proper stuff follows... |
19 | |
20 syn keyword objcPreProcMacro __OBJC__ __OBJC2__ __clang__ | |
7 | 21 |
4869 | 22 " Defined Types |
4911 | 23 syn keyword objcPrincipalType id Class SEL IMP BOOL instancetype |
4869 | 24 syn keyword objcUsefulTerm nil Nil NO YES |
7 | 25 |
4869 | 26 " Preprocessor Directives |
27 syn region objcImported display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ | |
28 syn match objcImported display contained "<[^>]*>" | |
29 syn match objcImport display "^\s*\(%:\|#\)\s*import\>\s*["<]" contains=objcImported | |
7 | 30 |
4869 | 31 " ObjC Compiler Directives |
32 syn match objcObjDef display /@interface\>\|@implementation\>\|@end\>\|@class\>/ | |
33 syn match objcProtocol display /@protocol\>\|@optional\>\|@required\>/ | |
34 syn match objcProperty display /@property\>\|@synthesize\>\|@dynamic\>/ | |
35 syn match objcIvarScope display /@private\>\|@protected\>\|@public\>/ | |
36 syn match objcInternalRep display /@selector\>\|@encode\>/ | |
37 syn match objcException display /@try\>\|@throw\>\|@catch\|@finally\>/ | |
38 syn match objcThread display /@synchronized\>/ | |
39 syn match objcPool display /@autoreleasepool\>/ | |
4911 | 40 syn match objcModuleImport display /@import\>/ |
4159 | 41 |
4869 | 42 " ObjC Constant Strings |
43 syn match objcSpecial display contained "%@" | |
7 | 44 syn region objcString start=+\(@"\|"\)+ skip=+\\\\\|\\"+ end=+"+ contains=cFormat,cSpecial,objcSpecial |
45 | |
4869 | 46 " ObjC Hidden Arguments |
47 syn keyword objcHiddenArgument self _cmd super | |
48 | |
49 " ObjC Type Qualifiers for Blocks | |
50 syn keyword objcBlocksQualifier __block | |
51 " ObjC Type Qualifiers for Object Lifetime | |
52 syn keyword objcObjectLifetimeQualifier __strong __weak __unsafe_unretained __autoreleasing | |
53 " ObjC Type Qualifiers for Toll-Free Bridge | |
54 syn keyword objcTollFreeBridgeQualifier __bridge __bridge_retained __bridge_transfer | |
7 | 55 |
4869 | 56 " ObjC Type Qualifiers for Remote Messaging |
57 syn 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 | |
58 | |
59 " shorthand | |
60 syn cluster objcTypeQualifier contains=objcBlocksQualifier,objcObjectLifetimeQualifier,objcTollFreeBridgeQualifier,objcRemoteMessagingQualifier | |
61 | |
62 " ObjC Fast Enumeration | |
63 syn match objcFastEnumKeyword display /\sin\(\s\|$\)/ | |
64 | |
65 " ObjC Literal Syntax | |
66 syn match objcLiteralSyntaxNumber display /@\(YES\>\|NO\>\|\d\|-\|+\)/ contains=cNumber,cFloat,cOctal | |
67 syn match objcLiteralSyntaxSpecialChar display /@'/ contains=cSpecialCharacter | |
68 syn match objcLiteralSyntaxChar display /@'[^\\]'/ | |
69 syn match objcLiteralSyntaxOp display /@\((\|\[\|{\)/me=e-1,he=e-1 | |
7 | 70 |
4869 | 71 " ObjC Declared Property Attributes |
72 syn match objDeclPropAccessorNameAssign display /\s*=\s*/ contained | |
73 syn region objcDeclPropAccessorName display start=/\(getter\|setter\)/ end=/\h\w*/ contains=objDeclPropAccessorNameAssign | |
74 syn keyword objcDeclPropAccessorType readonly readwrite contained | |
75 syn keyword objcDeclPropAssignSemantics assign retain copy contained | |
76 syn keyword objcDeclPropAtomicity nonatomic contained | |
77 syn keyword objcDeclPropARC strong weak contained | |
78 syn region objcDeclProp display transparent keepend start=/@property\s*(/ end=/)/ contains=objcProperty,objcDeclPropAccessorName,objcDeclPropAccessorType,objcDeclPropAssignSemantics,objcDeclPropAtomicity,objcDeclPropARC | |
79 | |
80 " To distinguish colons in methods and dictionaries from those in C's labels. | |
81 syn match objcColon display /^\s*\h\w*\s*\:\(\s\|.\)/me=e-1,he=e-1 | |
82 | |
83 " To distinguish a protocol list from system header files | |
84 syn match objcProtocolList display /<\h\w*\(\s*,\s*\h\w*\)*>/ contains=objcPrincipalType,cType,Type | |
85 | |
86 " shorthand | |
87 syn cluster objcCEntities contains=cType,cStructure,cStorageClass,cString,cCharacter,cSpecialCharacter,cNumbers,cConstant,cOperator,cComment,cCommentL,cStatement,cLabel,cConditional,cRepeat | |
4911 | 88 syn cluster objcObjCEntities contains=objcHiddenArgument,objcPrincipalType,objcString,objcUsefulTerm,objcProtocol,objcInternalRep,objcException,objcThread,objcPool,objcModuleImport,@objcTypeQualifier,objcLiteralSyntaxNumber,objcLiteralSyntaxOp,objcLiteralSyntaxChar,objcLiteralSyntaxSpecialChar,objcProtocolList,objcColon,objcFastEnumKeyword,objcType,objcClass,objcMacro,objcEnum,objcEnumValue,objcExceptionValue,objcNotificationValue,objcConstVar,objcPreProcMacro |
4869 | 89 |
90 " Objective-C Message Expressions | |
91 syn region objcMethodCall start=/\[/ end=/\]/ contains=objcMethodCall,objcBlocks,@objcObjCEntities,@objcCEntities | |
92 | |
93 " To distinguish class method and instance method | |
94 syn match objcInstanceMethod display /^s*-\s*/ | |
95 syn match objcClassMethod display /^s*+\s*/ | |
96 | |
97 " ObjC Blocks | |
98 syn region objcBlocks start=/\(\^\s*([^)]\+)\s*{\|\^\s*{\)/ end=/}/ contains=objcBlocks,objcMethodCall,@objcObjCEntities,@objcCEntities | |
99 | |
100 syn cluster cParenGroup add=objcMethodCall | |
101 syn cluster cPreProcGroup add=objcMethodCall | |
102 | |
103 """ Foundation Framework | |
104 syn match objcClass /Protocol\s*\*/me=s+8,he=s+8 | |
7 | 105 |
4869 | 106 """"""""""""""""" |
107 " NSObjCRuntime.h | |
108 syn keyword objcType NSInteger NSUInteger NSComparator | |
109 syn keyword objcEnum NSComparisonResult | |
110 syn keyword objcEnumValue NSOrderedAscending NSOrderedSame NSOrderedDescending | |
111 syn keyword objcEnum NSEnumerationOptions | |
112 syn keyword objcEnumValue NSEnumerationConcurrent NSEnumerationReverse | |
113 syn keyword objcEnum NSSortOptions | |
114 syn keyword objcEnumValue NSSortConcurrent NSSortStable | |
115 syn keyword objcEnumValue NSNotFound | |
116 syn keyword objcMacro NSIntegerMax NSIntegerMin NSUIntegerMax | |
117 " NSRange.h | |
118 syn keyword objcType NSRange NSRangePointer | |
119 " NSGeometry.h | |
120 syn keyword objcType NSPoint NSPointPointer NSPointArray NSSize NSSizePointer NSSizeArray NSRect NSRectPointer NSRectArray | |
121 syn keyword objcEnum NSRectEdge | |
122 syn keyword objcEnumValue NSMinXEdge NSMinYEdge NSMaxXEdge NSMaxYEdge | |
123 syn keyword objcConstVar NSZeroPoint NSZeroSize NSZeroRect | |
124 syn keyword cType CGFloat CGPoint CGSize CGRect | |
125 syn keyword objcEnum NSAlignmentOptions | |
126 syn keyword objcEnumValue NSAlignMinXInward NSAlignMinYInward NSAlignMaxXInward NSAlignMaxYInward NSAlignWidthInward NSAlignHeightInward NSAlignMinXOutward NSAlignMinYOutward NSAlignMaxXOutward NSAlignMaxYOutward NSAlignWidthOutward NSAlignHeightOutward NSAlignMinXNearest NSAlignMinYNearest NSAlignMaxXNearest NSAlignMaxYNearest NSAlignWidthNearest NSAlignHeightNearest NSAlignRectFlipped NSAlignAllEdgesInward NSAlignAllEdgesOutward NSAlignAllEdgesNearest | |
127 " NSDecimal.h | |
128 syn keyword objcType NSDecimal | |
129 syn keyword objcEnum NSRoundingMode | |
130 syn keyword objcEnumValue NSRoundPlain NSRoundDown NSRoundUp NSRoundBankers | |
131 syn keyword objcEnum NSCalculationError | |
132 syn keyword objcEnumValue NSCalculationNoError NSCalculationLossOfPrecision NSCalculationUnderflow NSCalculationOverflow NSCalculationDivideByZero | |
133 " NSDate.h | |
134 syn match objcClass /NSDate\s*\*/me=s+6,he=s+6 | |
135 syn keyword objcType NSTimeInterval | |
136 syn keyword objcNotificationValue NSSystemClockDidChangeNotification | |
137 syn keyword objcMacro NSTimeIntervalSince1970 | |
138 " NSZone.h | |
139 syn match objcType /NSZone\s*\*/me=s+6,he=s+6 | |
140 " NSError.h | |
141 syn match objcClass /NSError\s*\*/me=s+7,he=s+7 | |
142 syn keyword objcConstVar NSCocoaErrorDomain NSPOSIXErrorDomain NSOSStatusErrorDomain NSMachErrorDomain NSUnderlyingErrorKey NSLocalizedDescriptionKey NSLocalizedFailureReasonErrorKey NSLocalizedRecoverySuggestionErrorKey NSLocalizedRecoveryOptionsErrorKey NSRecoveryAttempterErrorKey NSHelpAnchorErrorKey NSStringEncodingErrorKey NSURLErrorKey NSFilePathErrorKey | |
143 " NSException.h | |
144 syn match objcClass /NSException\s*\*/me=s+11,he=s+11 | |
145 syn keyword objcType NSUncaughtExceptionHandler | |
146 syn keyword objcConstVar NSGenericException NSRangeException NSInvalidArgumentException NSInternalInconsistencyException NSMallocException NSObjectInaccessibleException NSObjectNotAvailableException NSDestinationInvalidException NSPortTimeoutException NSInvalidSendPortException NSInvalidReceivePortException NSPortSendException NSPortReceiveException NSOldStyleException | |
147 " NSNotification.h | |
148 syn match objcClass /NSNotification\s*\*/me=s+14,he=s+14 | |
149 syn match objcClass /NSNotificationCenter\s*\*/me=s+20,he=s+20 | |
150 " NSDistributedNotificationCenter.h | |
151 syn match objcClass /NSDistributedNotificationCenter\s*\*/me=s+31,he=s+31 | |
152 syn keyword objcConstVar NSLocalNotificationCenterType | |
153 syn keyword objcEnum NSNotificationSuspensionBehavior | |
154 syn keyword objcEnumValue NSNotificationSuspensionBehaviorDrop NSNotificationSuspensionBehaviorCoalesce NSNotificationSuspensionBehaviorHold NSNotificationSuspensionBehaviorHold NSNotificationSuspensionBehaviorDeliverImmediately | |
155 syn keyword objcEnumValue NSNotificationDeliverImmediately NSNotificationPostToAllSessions | |
156 " NSNotificationQueue.h | |
157 syn match objcClass /NSNotificationQueue\s*\*/me=s+19,he=s+19 | |
158 syn keyword objcEnum NSPostingStyle | |
159 syn keyword objcEnumValue NSPostWhenIdle NSPostASAP NSPostNow | |
160 syn keyword objcEnum NSNotificationCoalescing | |
161 syn keyword objcEnumValue NSNotificationNoCoalescing NSNotificationCoalescingOnName NSNotificationCoalescingOnSender | |
162 " NSEnumerator.h | |
163 syn match objcClass /NSEnumerator\s*\*/me=s+12,he=s+12 | |
164 " NSIndexSet.h | |
165 syn match objcClass /NSIndexSet\s*\*/me=s+10,he=s+10 | |
166 syn match objcClass /NSMutableIndexSet\s*\*/me=s+17,he=s+17 | |
167 " NSCharecterSet.h | |
168 syn match objcClass /NSCharacterSet\s*\*/me=s+14,he=s+14 | |
169 " NSURL.h | |
170 syn match objcClass /NSURL\s*\*/me=s+5,he=s+5 | |
171 syn keyword objcEnum NSURLBookmarkCreationOptions | |
172 syn keyword objcEnumValue NSURLBookmarkCreationPreferFileIDResolution NSURLBookmarkCreationMinimalBookmark NSURLBookmarkCreationSuitableForBookmarkFile NSURLBookmarkCreationWithSecurityScope NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess | |
173 syn keyword objcEnum NSURLBookmarkResolutionOptions | |
174 syn keyword objcEnumValue NSURLBookmarkResolutionWithoutUI NSURLBookmarkResolutionWithoutMounting NSURLBookmarkResolutionWithSecurityScope | |
175 syn keyword objcType NSURLBookmarkFileCreationOptions | |
176 syn keyword objcConstVar NSURLFileScheme NSURLKeysOfUnsetValuesKey | |
177 syn 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 | |
178 syn keyword objcConstVar NSURLFileResourceTypeNamedPipe NSURLFileResourceTypeCharacterSpecial NSURLFileResourceTypeDirectory NSURLFileResourceTypeBlockSpecial NSURLFileResourceTypeRegular NSURLFileResourceTypeSymbolicLink NSURLFileResourceTypeSocket NSURLFileResourceTypeUnknown | |
179 syn keyword objcConstVar NSURLFileSizeKey NSURLFileAllocatedSizeKey NSURLTotalFileSizeKey NSURLTotalFileAllocatedSizeKey NSURLIsAliasFileKey | |
180 syn 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 | |
181 syn keyword objcConstVar NSURLIsUbiquitousItemKey NSURLUbiquitousItemHasUnresolvedConflictsKey NSURLUbiquitousItemIsDownloadedKey NSURLUbiquitousItemIsDownloadingKey NSURLUbiquitousItemIsUploadedKey NSURLUbiquitousItemIsUploadingKey NSURLUbiquitousItemPercentDownloadedKey NSURLUbiquitousItemPercentUploadedKey | |
182 """""""""""" | |
183 " NSString.h | |
184 syn match objcClass /NSString\s*\*/me=s+8,he=s+8 | |
185 syn match objcClass /NSMutableString\s*\*/me=s+15,he=s+15 | |
186 syn keyword objcType unichar | |
187 syn keyword objcExceptionValue NSParseErrorException NSCharacterConversionException | |
188 syn keyword objcMacro NSMaximumStringLength | |
189 syn keyword objcEnum NSStringCompareOptions | |
190 syn keyword objcEnumValue NSCaseInsensitiveSearch NSLiteralSearch NSBackwardsSearch NSAnchoredSearch NSNumericSearch NSDiacriticInsensitiveSearch NSWidthInsensitiveSearch NSForcedOrderingSearch NSRegularExpressionSearch | |
191 syn keyword objcEnum NSStringEncoding | |
192 syn 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 | |
193 syn keyword objcEnum NSStringEncodingConversionOptions | |
194 syn keyword objcEnumValue NSStringEncodingConversionAllowLossy NSStringEncodingConversionExternalRepresentation | |
195 syn keyword objcEnum NSStringEnumerationOptions | |
196 syn keyword objcEnumValue NSStringEnumerationByLines NSStringEnumerationByParagraphs NSStringEnumerationByComposedCharacterSequences NSStringEnumerationByWords NSStringEnumerationBySentences NSStringEnumerationReverse NSStringEnumerationSubstringNotRequired NSStringEnumerationLocalized | |
197 " NSAttributedString.h | |
198 syn match objcClass /NSAttributedString\s*\*/me=s+18,he=s+18 | |
199 syn match objcClass /NSMutableAttributedString\s*\*/me=s+25,he=s+25 | |
200 syn keyword objcEnum NSAttributedStringEnumerationOptions | |
201 syn keyword objcEnumValue NSAttributedStringEnumerationReverse NSAttributedStringEnumerationLongestEffectiveRangeNotRequired | |
202 " NSValue.h | |
203 syn match objcClass /NSValue\s*\*/me=s+7,he=s+7 | |
204 syn match objcClass /NSNumber\s*\*/me=s+8,he=s+8 | |
205 " NSDecimalNumber.h | |
206 syn match objcClass /NSDecimalNumber\s*\*/me=s+15,he=s+15 | |
207 syn match objcClass /NSDecimalNumberHandler\s*\*/me=s+22,he=s+22 | |
208 syn keyword objcExceptionValue NSDecimalNumberExactnessException NSDecimalNumberOverflowException NSDecimalNumberUnderflowException NSDecimalNumberDivideByZeroException | |
209 " NSData.h | |
210 syn match objcClass /NSData\s*\*/me=s+6,he=s+6 | |
211 syn match objcClass /NSMutableData\s*\*/me=s+13,he=s+13 | |
212 syn keyword objcEnum NSDataReadingOptions | |
213 syn keyword objcEnumValue NSDataReadingMappedIfSafe NSDataReadingUncached NSDataReadingMappedAlways NSDataReadingMapped NSMappedRead NSUncachedRead | |
214 syn keyword objcEnum NSDataWritingOptions | |
215 syn keyword objcEnumValue NSDataWritingAtomic NSDataWritingWithoutOverwriting NSDataWritingFileProtectionNone NSDataWritingFileProtectionComplete NSDataWritingFileProtectionCompleteUnlessOpen NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication NSDataWritingFileProtectionMask NSAtomicWrite | |
216 syn keyword objcEnum NSDataSearchOptions | |
217 syn keyword objcEnumValue NSDataSearchBackwards NSDataSearchAnchored | |
218 " NSArray.h | |
219 syn match objcClass /NSArray\s*\*/me=s+7,he=s+7 | |
220 syn match objcClass /NSMutableArray\s*\*/me=s+14,he=s+14 | |
221 syn keyword objcEnum NSBinarySearchingOptions | |
222 syn keyword objcEnumValue NSBinarySearchingFirstEqual NSBinarySearchingLastEqual NSBinarySearchingInsertionIndex | |
223 " NSDictionary.h | |
224 syn match objcClass /NSDictionary\s*\*/me=s+12,he=s+12 | |
225 syn match objcClass /NSMutableDictionary\s*\*/me=s+19,he=s+19 | |
226 " NSSet.h | |
227 syn match objcClass /NSSet\s*\*/me=s+5,me=s+5 | |
228 syn match objcClass /NSMutableSet\s*\*/me=s+12,me=s+12 | |
229 syn match objcClass /NSCountedSet\s*\*/me=s+12,me=s+12 | |
230 " NSOrderedSet.h | |
231 syn match objcClass /NSOrderedSet\s*\*/me=s+12,me=s+12 | |
232 syn match objcClass /NSMutableOrderedSet\s*\*/me=s+19,me=s+19 | |
233 """"""""""""""""""" | |
234 " NSPathUtilities.h | |
235 syn keyword objcEnum NSSearchPathDirectory | |
236 syn 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 | |
237 syn keyword objcEnum NSSearchPathDomainMask | |
238 syn keyword objcEnumValue NSUserDomainMask NSLocalDomainMask NSNetworkDomainMask NSSystemDomainMask NSAllDomainsMask | |
239 " NSFileManger.h | |
240 syn match objcClass /NSFileManager\s*\*/me=s+13,he=s+13 | |
241 syn match objcClass /NSDirectoryEnumerator\s*\*/me=s+21,he=s+21 | |
242 syn keyword objcEnum NSVolumeEnumerationOptions | |
243 syn keyword objcEnumValue NSVolumeEnumerationSkipHiddenVolumes NSVolumeEnumerationProduceFileReferenceURLs | |
244 syn keyword objcEnum NSDirectoryEnumerationOptions | |
245 syn keyword objcEnumValue NSDirectoryEnumerationSkipsSubdirectoryDescendants NSDirectoryEnumerationSkipsPackageDescendants NSDirectoryEnumerationSkipsHiddenFiles | |
246 syn keyword objcEnum NSFileManagerItemReplacementOptions | |
247 syn keyword objcEnumValue NSFileManagerItemReplacementUsingNewMetadataOnly NSFileManagerItemReplacementWithoutDeletingBackupItem | |
248 syn keyword objcNotificationValue NSUbiquityIdentityDidChangeNotification | |
249 syn 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 | |
250 " NSFileHandle.h | |
251 syn match objcClass /NSFileHandle\s*\*/me=s+12,he=s+12 | |
252 syn keyword objcExceptionValue NSFileHandleOperationException | |
253 syn keyword objcNotificationValue NSFileHandleReadCompletionNotification NSFileHandleReadToEndOfFileCompletionNotification NSFileHandleConnectionAcceptedNotification NSFileHandleDataAvailableNotification NSFileHandleNotificationDataItem NSFileHandleNotificationFileHandleItem NSFileHandleNotificationMonitorModes | |
254 syn match objcClass /NSPipe\s*\*/me=s+6,he=s+6 | |
255 """""""""""" | |
256 " NSLocale.h | |
257 syn match objcClass /NSLocale\s*\*/me=s+8,he=s+8 | |
258 syn keyword objcEnum NSLocaleLanguageDirection | |
259 syn keyword objcEnumValue NSLocaleLanguageDirectionUnknown NSLocaleLanguageDirectionLeftToRight NSLocaleLanguageDirectionRightToLeft NSLocaleLanguageDirectionTopToBottom NSLocaleLanguageDirectionBottomToTop | |
260 syn keyword objcNotificationValue NSCurrentLocaleDidChangeNotification | |
261 syn 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 | |
262 " NSFormatter.h | |
263 syn match objcClass /NSFormatter\s*\*/me=s+11,he=s+11 | |
264 " NSNumberFormatter.h | |
265 syn match objcClass /NSNumberFormatter\s*\*/me=s+17,he=s+17 | |
266 syn keyword objcEnum NSNumberFormatterStyle | |
267 syn keyword objcEnumValue NSNumberFormatterNoStyle NSNumberFormatterDecimalStyle NSNumberFormatterCurrencyStyle NSNumberFormatterPercentStyle NSNumberFormatterScientificStyle NSNumberFormatterSpellOutStyle | |
268 syn keyword objcEnum NSNumberFormatterBehavior | |
269 syn keyword objcEnumValue NSNumberFormatterBehaviorDefault NSNumberFormatterBehavior10_0 NSNumberFormatterBehavior10_4 | |
270 syn keyword objcEnum NSNumberFormatterPadPosition | |
271 syn keyword objcEnumValue NSNumberFormatterPadBeforePrefix NSNumberFormatterPadAfterPrefix NSNumberFormatterPadBeforeSuffix NSNumberFormatterPadAfterSuffix | |
272 syn keyword objcEnum NSNumberFormatterRoundingMode | |
273 syn keyword objcEnumValue NSNumberFormatterRoundCeiling NSNumberFormatterRoundFloor NSNumberFormatterRoundDown NSNumberFormatterRoundUp NSNumberFormatterRoundHalfEven NSNumberFormatterRoundHalfDown NSNumberFormatterRoundHalfUp | |
274 " NSDateFormatter.h | |
275 syn match objcClass /NSDateFormatter\s*\*/me=s+15,he=s+15 | |
276 syn keyword objcEnum NSDateFormatterStyle | |
277 syn keyword objcEnumValue NSDateFormatterNoStyle NSDateFormatterShortStyle NSDateFormatterMediumStyle NSDateFormatterLongStyle NSDateFormatterFullStyle | |
278 syn keyword objcEnum NSDateFormatterBehavior | |
279 syn keyword objcEnumValue NSDateFormatterBehaviorDefault NSDateFormatterBehavior10_0 NSDateFormatterBehavior10_4 | |
280 " NSCalendar.h | |
281 syn match objcClass /NSCalendar\s*\*/me=s+10,he=s+10 | |
282 syn keyword objcEnum NSCalendarUnit | |
283 syn keyword objcEnumValue NSEraCalendarUnit NSYearCalendarUnit NSMonthCalendarUnit NSDayCalendarUnit NSHourCalendarUnit NSMinuteCalendarUnit NSSecondCalendarUnit NSWeekCalendarUnit NSWeekdayCalendarUnit NSWeekdayOrdinalCalendarUnit NSQuarterCalendarUnit NSWeekOfMonthCalendarUnit NSWeekOfYearCalendarUnit NSYearForWeekOfYearCalendarUnit NSCalendarCalendarUnit NSTimeZoneCalendarUnit | |
284 syn keyword objcEnumValue NSWrapCalendarComponents NSUndefinedDateComponent | |
285 syn match objcClass /NSDateComponents\s*\*/me=s+16,he=s+16 | |
286 " NSTimeZone.h | |
287 syn match objcClass /NSTimeZone\s*\*/me=s+10,he=s+10 | |
288 syn keyword objcEnum NSTimeZoneNameStyle | |
289 syn keyword objcEnumValue NSTimeZoneNameStyleStandard NSTimeZoneNameStyleShortStandard NSTimeZoneNameStyleDaylightSaving NSTimeZoneNameStyleShortDaylightSaving NSTimeZoneNameStyleGeneric NSTimeZoneNameStyleShortGeneric | |
290 syn keyword objcNotificationValue NSSystemTimeZoneDidChangeNotification | |
291 """"""""""" | |
292 " NSCoder.h | |
293 syn match objcClass /NSCoder\s*\*/me=s+7,he=s+7 | |
294 " NSArchiver.h | |
295 syn match objcClass /NSArchiver\s*\*/me=s+10,he=s+10 | |
296 syn match objcClass /NSUnarchiver\s*\*/me=s+12,he=s+12 | |
297 syn keyword objcExceptionValue NSInconsistentArchiveException | |
298 " NSKeyedArchiver.h | |
299 syn match objcClass /NSKeyedArchiver\s*\*/me=s+15,he=s+15 | |
300 syn match objcClass /NSKeyedUnarchiver\s*\*/me=s+17,he=s+17 | |
301 syn keyword objcExceptionValue NSInvalidArchiveOperationException NSInvalidUnarchiveOperationException | |
302 """""""""""""""""" | |
303 " NSPropertyList.h | |
304 syn keyword objcEnum NSPropertyListMutabilityOptions | |
305 syn keyword objcEnumValue NSPropertyListImmutable NSPropertyListMutableContainers NSPropertyListMutableContainersAndLeaves | |
306 syn keyword objcEnum NSPropertyListFormat | |
307 syn keyword objcEnumValue NSPropertyListOpenStepFormat NSPropertyListXMLFormat_v1_0 NSPropertyListBinaryFormat_v1_0 | |
308 syn keyword objcType NSPropertyListReadOptions NSPropertyListWriteOptions | |
309 " NSUserDefaults.h | |
310 syn match objcClass /NSUserDefaults\s*\*/me=s+14,he=s+14 | |
311 syn keyword objcConstVar NSGlobalDomain NSArgumentDomain NSRegistrationDomain | |
312 syn keyword objcNotificationValue NSUserDefaultsDidChangeNotification | |
313 " NSBundle.h | |
314 syn match objcClass /NSBundle\s*\*/me=s+8,he=s+8 | |
315 syn keyword objcEnumValue NSBundleExecutableArchitectureI386 NSBundleExecutableArchitecturePPC NSBundleExecutableArchitectureX86_64 NSBundleExecutableArchitecturePPC64 | |
316 syn keyword objcNotificationValue NSBundleDidLoadNotification NSLoadedClasses | |
317 """"""""""""""""" | |
318 " NSProcessInfo.h | |
319 syn match objcClass /NSProcessInfo\s*\*/me=s+13,he=s+13 | |
320 syn keyword objcEnumValue NSWindowsNTOperatingSystem NSWindows95OperatingSystem NSSolarisOperatingSystem NSHPUXOperatingSystem NSMACHOperatingSystem NSSunOSOperatingSystem NSOSF1OperatingSystem | |
321 " NSTask.h | |
322 syn match objcClass /NSTask\s*\*/me=s+6,he=s+6 | |
323 syn keyword objcEnum NSTaskTerminationReason | |
324 syn keyword objcEnumValue NSTaskTerminationReasonExit NSTaskTerminationReasonUncaughtSignal | |
325 syn keyword objcNotificationValue NSTaskDidTerminateNotification | |
326 " NSThread.h | |
327 syn match objcClass /NSThread\s*\*/me=s+8,he=s+8 | |
328 syn keyword objcNotificationValue NSWillBecomeMultiThreadedNotification NSDidBecomeSingleThreadedNotification NSThreadWillExitNotification | |
329 " NSLock.h | |
330 syn match objcClass /NSLock\s*\*/me=s+6,he=s+6 | |
331 syn match objcClass /NSConditionLock\s*\*/me=s+15,he=s+15 | |
332 syn match objcClass /NSRecursiveLock\s*\*/me=s+15,he=s+15 | |
333 " NSDictributedLock | |
334 syn match objcClass /NSDistributedLock\s*\*/me=s+17,he=s+17 | |
335 " NSOperation.h | |
336 """""""""""""""" | |
337 syn match objcClass /NSOperation\s*\*/me=s+11,he=s+11 | |
338 syn keyword objcEnum NSOperationQueuePriority | |
339 syn keyword objcEnumValue NSOperationQueuePriorityVeryLow NSOperationQueuePriorityLow NSOperationQueuePriorityNormal NSOperationQueuePriorityHigh NSOperationQueuePriorityVeryHigh | |
340 syn match objcClass /NSBlockOperation\s*\*/me=s+16,he=s+16 | |
341 syn match objcClass /NSInvocationOperation\s*\*/me=s+21,he=s+21 | |
342 syn keyword objcExceptionValue NSInvocationOperationVoidResultException NSInvocationOperationCancelledException | |
343 syn match objcClass /NSOperationQueue\s*\*/me=s+16,he=s+16 | |
344 syn keyword objcEnumValue NSOperationQueueDefaultMaxConcurrentOperationCount | |
345 " NSConnection.h | |
346 syn match objcClass /NSConnection\s*\*/me=s+12,he=s+12 | |
347 syn keyword objcConstVar NSConnectionReplyMode | |
348 syn keyword objcNotificationValue NSConnectionDidDieNotification NSConnectionDidInitializeNotification | |
349 syn keyword objcExceptionValue NSFailedAuthenticationException | |
350 " NSPort.h | |
351 syn match objcClass /NSPort\s*\*/me=s+6,he=s+6 | |
352 syn keyword objcType NSSocketNativeHandle | |
353 syn keyword objcNotificationValue NSPortDidBecomeInvalidNotification | |
354 syn match objcClass /NSMachPort\s*\*/me=s+10,he=s+10 | |
355 syn keyword objcEnumValue NSMachPortDeallocateNone NSMachPortDeallocateSendRight NSMachPortDeallocateReceiveRight | |
356 syn match objcClass /NSMessagePort\s*\*/me=s+13,he=s+13 | |
357 syn match objcClass /NSSocketPort\s*\*/me=s+12,he=s+12 | |
358 " NSPortMessage.h | |
359 syn match objcClass /NSPortMessage\s*\*/me=s+13,he=s+13 | |
360 " NSDistantObject.h | |
361 syn match objcClass /NSDistantObject\s*\*/me=s+15,he=s+15 | |
362 " NSPortNameServer.h | |
363 syn match objcClass /NSPortNameServer\s*\*/me=s+16,he=s+16 | |
364 syn match objcClass /NSMessagePortNameServer\s*\*/me=s+23,he=s+23 | |
365 syn match objcClass /NSSocketPortNameServer\s*\*/me=s+22,he=s+22 | |
366 " NSHost.h | |
367 syn match objcClass /NSHost\s*\*/me=s+6,he=s+6 | |
368 " NSInvocation.h | |
369 syn match objcClass /NSInvocation\s*\*/me=s+12,he=s+12 | |
370 " NSMethodSignature.h | |
371 syn match objcClass /NSMethodSignature\s*\*/me=s+17,he=s+17 | |
372 """"" | |
373 " NSScanner.h | |
374 syn match objcClass /NSScanner\s*\*/me=s+9,he=s+9 | |
375 " NSTimer.h | |
376 syn match objcClass /NSTimer\s*\*/me=s+7,he=s+7 | |
377 " NSAutoreleasePool.h | |
378 syn match objcClass /NSAutoreleasePool\s*\*/me=s+17,he=s+17 | |
379 " NSRunLoop.h | |
380 syn match objcClass /NSRunLoop\s*\*/me=s+9,he=s+9 | |
381 syn keyword objcConstVar NSDefaultRunLoopMode NSRunLoopCommonModes | |
382 " NSNull.h | |
383 syn match objcClass /NSNull\s*\*/me=s+6,he=s+6 | |
384 " NSProxy.h | |
385 syn match objcClass /NSProxy\s*\*/me=s+7,he=s+7 | |
386 " NSObject.h | |
387 syn match objcClass /NSObject\s*\*/me=s+8,he=s+8 | |
7 | 388 |
4869 | 389 """ Default Highlighting |
390 hi def link objcPreProcMacro cConstant | |
391 hi def link objcPrincipalType cType | |
392 hi def link objcUsefulTerm cConstant | |
393 hi def link objcImport cInclude | |
394 hi def link objcImported cString | |
395 hi def link objcObjDef cOperator | |
396 hi def link objcProtocol cOperator | |
397 hi def link objcProperty cOperator | |
398 hi def link objcIvarScope cOperator | |
399 hi def link objcInternalRep cOperator | |
400 hi def link objcException cOperator | |
401 hi def link objcThread cOperator | |
402 hi def link objcPool cOperator | |
4911 | 403 hi def link objcModuleImport cOperator |
4869 | 404 hi def link objcSpecial cSpecial |
405 hi def link objcString cString | |
406 hi def link objcHiddenArgument cStatement | |
407 hi def link objcBlocksQualifier cStorageClass | |
408 hi def link objcObjectLifetimeQualifier cStorageClass | |
409 hi def link objcTollFreeBridgeQualifier cStorageClass | |
410 hi def link objcRemoteMessagingQualifier cStorageClass | |
411 hi def link objcFastEnumKeyword cStatement | |
412 hi def link objcLiteralSyntaxNumber cNumber | |
413 hi def link objcLiteralSyntaxChar cCharacter | |
414 hi def link objcLiteralSyntaxSpecialChar cCharacter | |
415 hi def link objcLiteralSyntaxOp cOperator | |
416 hi def link objcDeclPropAccessorName cConstant | |
417 hi def link objcDeclPropAccessorType cConstant | |
418 hi def link objcDeclPropAssignSemantics cConstant | |
419 hi def link objcDeclPropAtomicity cConstant | |
420 hi def link objcDeclPropARC cConstant | |
421 hi def link objcInstanceMethod Function | |
422 hi def link objcClassMethod Function | |
423 hi def link objcType cType | |
424 hi def link objcClass cType | |
425 hi def link objcMacro cConstant | |
426 hi def link objcEnum cType | |
427 hi def link objcEnumValue cConstant | |
428 hi def link objcExceptionValue cConstant | |
429 hi def link objcNotificationValue cConstant | |
430 hi def link objcConstVar cConstant | |
7 | 431 |
4869 | 432 """ Final step |
433 let b:current_syntax = "objc" | |
434 let &cpo = s:cpo_save | |
435 unlet s:cpo_save | |
3496
d1e4abe8342c
Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents:
1121
diff
changeset
|
436 |
4869 | 437 " vim: ts=8 sw=2 sts=2 |