389
|
1 " Vim syntax file
|
|
2 " Language: setserial(8) configuration file
|
839
|
3 " Maintainer: Nikolai Weibull <now@bitwi.se>
|
|
4 " Latest Revision: 2006-04-19
|
389
|
5
|
|
6 if exists("b:current_syntax")
|
|
7 finish
|
|
8 endif
|
|
9
|
|
10 let s:cpo_save = &cpo
|
|
11 set cpo&vim
|
|
12
|
|
13 syn match setserialBegin display '^'
|
|
14 \ nextgroup=setserialDevice,setserialComment
|
|
15 \ skipwhite
|
|
16
|
|
17 syn match setserialDevice contained display '\%(/[^ \t/]*\)\+'
|
|
18 \ nextgroup=setserialParameter skipwhite
|
|
19
|
|
20 syn keyword setserialParameter contained port irq baud_base divisor
|
|
21 \ close_delay closing_wait rx_trigger
|
|
22 \ tx_trigger flow_off flow_on rx_timeout
|
|
23 \ nextgroup=setserialNumber skipwhite
|
|
24
|
|
25 syn keyword setserialParameter contained uart
|
|
26 \ nextgroup=setserialUARTType skipwhite
|
|
27
|
|
28 syn keyword setserialParameter contained autoconfig auto_irq skip_test
|
|
29 \ spd_hi spd_vhi spd_shi spd_warp spd_cust
|
|
30 \ spd_normal sak fourport session_lockout
|
|
31 \ pgrp_lockout hup_notify split_termios
|
|
32 \ callout_nohup low_latency
|
|
33 \ nextgroup=setserialParameter skipwhite
|
|
34
|
|
35 syn match setserialParameter contained display
|
|
36 \ '\^\%(auto_irq\|skip_test\|sak\|fourport\)'
|
|
37 \ contains=setserialNegation
|
|
38 \ nextgroup=setserialParameter skipwhite
|
|
39
|
|
40 syn match setserialParameter contained display
|
|
41 \ '\^\%(session_lockout\|pgrp_lockout\)'
|
|
42 \ contains=setserialNegation
|
|
43 \ nextgroup=setserialParameter skipwhite
|
|
44
|
|
45 syn match setserialParameter contained display
|
|
46 \ '\^\%(hup_notify\|split_termios\)'
|
|
47 \ contains=setserialNegation
|
|
48 \ nextgroup=setserialParameter skipwhite
|
|
49
|
|
50 syn match setserialParameter contained display
|
|
51 \ '\^\%(callout_nohup\|low_latency\)'
|
|
52 \ contains=setserialNegation
|
|
53 \ nextgroup=setserialParameter skipwhite
|
|
54
|
|
55 syn keyword setserialParameter contained set_multiport
|
|
56 \ nextgroup=setserialMultiport skipwhite
|
|
57
|
|
58 syn match setserialNumber contained display '\<\d\+\>'
|
|
59 \ nextgroup=setserialParameter skipwhite
|
|
60 syn match setserialNumber contained display '0x\x\+'
|
|
61 \ nextgroup=setserialParameter skipwhite
|
|
62
|
|
63 syn keyword setserialUARTType contained none
|
|
64
|
|
65 syn match setserialUARTType contained display
|
|
66 \ '8250\|16[4789]50\|16550A\=\|16650\%(V2\)\='
|
|
67 \ nextgroup=setserialParameter skipwhite
|
|
68
|
|
69 syn match setserialUARTType contained display '166[59]4'
|
|
70 \ nextgroup=setserialParameter skipwhite
|
|
71
|
|
72 syn match setserialNegation contained display '\^'
|
|
73
|
|
74 syn match setserialMultiport contained '\<port\d\+\>'
|
|
75 \ nextgroup=setserialPort skipwhite
|
|
76
|
|
77 syn match setserialPort contained display '\<\d\+\>'
|
|
78 \ nextgroup=setserialMask skipwhite
|
|
79 syn match setserialPort contained display '0x\x\+'
|
|
80 \ nextgroup=setserialMask skipwhite
|
|
81
|
|
82 syn match setserialMask contained '\<mask\d\+\>'
|
|
83 \ nextgroup=setserialBitMask skipwhite
|
|
84
|
|
85 syn match setserialBitMask contained display '\<\d\+\>'
|
|
86 \ nextgroup=setserialMatch skipwhite
|
|
87 syn match setserialBitMask contained display '0x\x\+'
|
|
88 \ nextgroup=setserialMatch skipwhite
|
|
89
|
|
90 syn match setserialMatch contained '\<match\d\+\>'
|
|
91 \ nextgroup=setserialMatchBits skipwhite
|
|
92
|
|
93 syn match setserialMatchBits contained display '\<\d\+\>'
|
|
94 \ nextgroup=setserialMultiport skipwhite
|
|
95 syn match setserialMatchBits contained display '0x\x\+'
|
|
96 \ nextgroup=setserialMultiport skipwhite
|
|
97
|
|
98 syn keyword setserialTodo contained TODO FIXME XXX NOTE
|
|
99
|
|
100 syn region setserialComment display oneline start='^\s*#' end='$'
|
|
101 \ contains=setserialTodo,@Spell
|
|
102
|
|
103 hi def link setserialTodo Todo
|
|
104 hi def link setserialComment Comment
|
|
105 hi def link setserialDevice Normal
|
|
106 hi def link setserialParameter Identifier
|
|
107 hi def link setserialNumber Number
|
|
108 hi def link setserialUARTType Type
|
|
109 hi def link setserialNegation Operator
|
|
110 hi def link setserialMultiport Type
|
|
111 hi def link setserialPort setserialNumber
|
|
112 hi def link setserialMask Type
|
|
113 hi def link setserialBitMask setserialNumber
|
|
114 hi def link setserialMatch Type
|
|
115 hi def link setserialMatchBits setserialNumber
|
|
116
|
|
117 let b:current_syntax = "setserial"
|
|
118
|
|
119 let &cpo = s:cpo_save
|
|
120 unlet s:cpo_save
|