Overview
Context
Changes
Deleted vim/after/syntax/objc.vim version [4bf4193e3c].
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
|
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
|
" Author: Michael Sanders (msanders42 [at] gmail [dot] com)
" Some modifications by Jonathan Schleifer <js@webkeks.org>
" Description: Better syntax highlighting for Objective-C files (part of the
" cocoa.vim plugin).
" Last Updated: May 6, 2011
"
" Put to ~/.vim/after/syntax/objc.vim
syn match objcDirective '@synthesize\|@property\|@optional\|@required\|@autoreleasepool' display
syn keyword objcType IBOutlet IBAction Method __block instancetype
syn keyword objcType __unsafe_unretained __bridge __bridge_retained __bridge_transfer __autoreleasing __strong __weak
syn keyword objcType of_unichar_t of_char16_t of_char32_t of_comparison_result_t
syn keyword objcType of_byte_order_t of_range_t of_point_t of_dimension_t
syn keyword objcType of_rectangle_t of_string_encoding_t of_time_interval_t
syn keyword objcType of_resolver_result_t of_udp_socket_address_t of_offset_t
syn keyword objcType of_stat_t of_socket_t
syn keyword objcConstant YES NO TRUE FALSE
syn region objcImp start='@implementation' end='@end' transparent
syn region objcHeader start='@interface' end='@end' transparent
syn match objcSubclass '\(@implementation\|@interface\)\@<=\s*\k\+' display contained containedin=objcImp,objcHeader
syn match objcSuperclass '\(@\(implementation\|interface\)\s*\k\+\s*:\)\@<=\s*\k*' display contained containedin=objcImp,objcHeader
" Matches "bar" in "[NSObject bar]" or "bar" in "[[NSObject foo: baz] bar]",
" but NOT "bar" in "[NSObject foo: bar]".
syn match objcMessageName '\(\[\s*\k\+\s\+\|\]\s*\)\@<=\k*\s*\]'me=e-1 display contained containedin=objcMessage
" Matches "foo:" in "[NSObject foo: bar]" or "[[NSObject new] foo: bar]"
syn match objcMessageColon '\(\_\S\+\_\s\+\)\@<=\k\+\s*:' display contained containedin=objcMessage
" Matches "foo:" in above
syn match objcMessageArg ')\@<=\s*\k\+' contained containedin=objcMessage
" Don't match these in this strange group for edge cases...
syn cluster cMultiGroup add=objcMessageColon,objcMessageName
hi link objcMessageArg Identifier
hi link objcMessageName objcMessageArg
hi link objcMessageColon objcMessageName
hi link objcMessageReceiver Special
hi link objcSubclass objcMethodName
hi link objcSuperclass String
hi link objcError Error
|
Added vim/syntax/objc.vim version [618b8617b9].