7
|
1 " Vim syntax file
|
|
2 " Language: Vim syntax file for SNMPv1 and SNMPv2 MIB and SMI files
|
|
3 " Author: David Pascoe <pascoedj@spamcop.net>
|
|
4 " Written: Wed Jan 28 14:37:23 GMT--8:00 1998
|
|
5 " Last Changed: Thu Feb 27 10:18:16 WST 2003
|
|
6
|
|
7 " For version 5.x: Clear all syntax items
|
|
8 " For version 6.x: Quit when a syntax file was already loaded
|
|
9 if version < 600
|
|
10 syntax clear
|
|
11 elseif exists("b:current_syntax")
|
|
12 finish
|
|
13 endif
|
|
14
|
|
15 if version >= 600
|
|
16 setlocal iskeyword=@,48-57,_,128-167,224-235,-,:,=
|
|
17 else
|
|
18 set iskeyword=@,48-57,_,128-167,224-235,-,:,=
|
|
19 endif
|
|
20
|
|
21 syn keyword mibImplicit ACCESS ANY AUGMENTS BEGIN BIT BITS BOOLEAN CHOICE
|
|
22 syn keyword mibImplicit COMPONENTS CONTACT-INFO DEFINITIONS DEFVAL
|
|
23 syn keyword mibImplicit DESCRIPTION DISPLAY-HINT END ENTERPRISE EXTERNAL FALSE
|
|
24 syn keyword mibImplicit FROM GROUP IMPLICIT IMPLIED IMPORTS INDEX
|
|
25 syn keyword mibImplicit LAST-UPDATED MANDATORY-GROUPS MAX-ACCESS
|
|
26 syn keyword mibImplicit MIN-ACCESS MODULE MODULE-COMPLIANCE MODULE-IDENTITY
|
|
27 syn keyword mibImplicit NOTIFICATION-GROUP NOTIFICATION-TYPE NOTIFICATIONS
|
|
28 syn keyword mibImplicit NULL OBJECT-GROUP OBJECT-IDENTITY OBJECT-TYPE
|
|
29 syn keyword mibImplicit OBJECTS OF OPTIONAL ORGANIZATION REFERENCE
|
|
30 syn keyword mibImplicit REVISION SEQUENCE SET SIZE STATUS SYNTAX
|
|
31 syn keyword mibImplicit TEXTUAL-CONVENTION TRAP-TYPE TRUE UNITS VARIABLES
|
|
32 syn keyword mibImplicit WRITE-SYNTAX ::=
|
|
33 syn keyword mibValue accessible-for-notify current DisplayString
|
|
34 syn keyword mibValue deprecated mandatory not-accessible obsolete optional
|
|
35 syn keyword mibValue read-create read-only read-write write-only INTEGER
|
|
36 syn keyword mibValue Counter Gauge IpAddress OCTET STRING experimental mib-2
|
|
37 syn keyword mibValue TimeTicks RowStatus TruthValue UInteger32 snmpModules
|
|
38 syn keyword mibValue Integer32 Counter32 TestAndIncr TimeStamp InstancePointer
|
|
39 syn keyword mibValue OBJECT IDENTIFIER Gauge32 AutonomousType Counter64
|
|
40 syn keyword mibValue PhysAddress TimeInterval MacAddress StorageType RowPointer
|
|
41 syn keyword mibValue TDomain TAddress ifIndex
|
|
42
|
|
43 " Epilogue SMI extensions
|
|
44 syn keyword mibEpilogue FORCE-INCLUDE EXCLUDE cookie get-function set-function
|
|
45 syn keyword mibEpilogue test-function get-function-async set-function-async
|
|
46 syn keyword mibEpilogue test-function-async next-function next-function-async
|
|
47 syn keyword mibEpilogue leaf-name
|
|
48 syn keyword mibEpilogue DEFAULT contained
|
|
49
|
|
50 syn match mibComment "\ *--.*$"
|
|
51 syn match mibNumber "\<['0-9a-fA-FhH]*\>"
|
|
52 syn region mibDescription start="\"" end="\"" contains=DEFAULT
|
|
53
|
|
54 " Define the default highlighting.
|
|
55 " For version 5.7 and earlier: only when not done already
|
|
56 " For version 5.8 and later: only when an item doesn't have highlighting yet
|
|
57 if version >= 508 || !exists("did_mib_syn_inits")
|
|
58 if version < 508
|
|
59 let did_mib_syn_inits = 1
|
|
60 command -nargs=+ HiLink hi link <args>
|
|
61 else
|
|
62 command -nargs=+ HiLink hi def link <args>
|
|
63 endif
|
|
64
|
|
65 HiLink mibImplicit Statement
|
|
66 HiLink mibComment Comment
|
|
67 HiLink mibConstants String
|
|
68 HiLink mibNumber Number
|
|
69 HiLink mibDescription Identifier
|
|
70 HiLink mibEpilogue SpecialChar
|
|
71 HiLink mibValue Structure
|
|
72 delcommand HiLink
|
|
73 endif
|
|
74
|
|
75 let b:current_syntax = "mib"
|
|
76
|
|
77 " vim: ts=8
|