Reformatted all code
[monky] / extras / vim / syntax / conkyrc.vim
1 " Vim syntax file
2 " Language:   conkyrc
3 " Author:     Ciaran McCreesh <ciaranm@gentoo.org>
4 " Version:    20060307
5 " Copyright:  Copyright (c) 2005 Ciaran McCreesh
6 " Licence:    You may redistribute this under the same terms as Vim itself
7 "
8 " $Id$
9
10 if exists("b:current_syntax")
11   finish
12 endif
13
14 syn region ConkyrcComment start=/^\s*#/ end=/$/
15
16 syn keyword ConkyrcSetting
17         \ alignment
18         \ background
19         \ border_margin
20         \ border_width
21         \ cpu_avg_samples
22         \ default_color
23         \ default_outline_color
24         \ default_shade_color
25         \ double_buffer
26         \ draw_borders
27         \ draw_graph_borders
28         \ draw_outline
29         \ draw_shades
30         \ font
31         \ gap_x
32         \ gap_y
33         \ imap
34         \ mail_spool
35         \ max_port_monitor_connections
36         \ max_specials
37         \ max_user_text
38         \ maximum_width
39         \ minimum_size
40         \ mpd_host
41         \ mpd_password
42         \ mpd_port
43         \ music_player_interval
44         \ net_avg_samples
45         \ no_buffers
46         \ out_to_console
47         \ override_utf8_locale
48         \ own_window
49         \ own_window_class
50         \ own_window_colour
51         \ own_window_hints
52         \ own_window_title
53         \ own_window_transparent
54         \ own_window_type
55         \ pad_percents
56         \ pop3
57         \ stippled_borders
58         \ total_run_times
59         \ update_interval
60         \ uppercase
61         \ use_spacer
62         \ use_xft
63         \ wm_class_name
64         \ xftalpha
65         \ xftfont
66
67 syn keyword ConkyrcConstant
68         \ above
69         \ below
70         \ bottom_left
71         \ bottom_right
72         \ desktop
73         \ no
74         \ none
75         \ normal
76         \ override
77         \ skip_pager
78         \ skip_taskbar
79         \ sticky
80         \ top_left
81         \ top_right
82         \ undecorated
83         \ yes
84
85 syn match ConkyrcNumber /\S\@<!\d\+\(\.\d\+\)\?\(\S\@!\|}\@=\)/
86       \ nextgroup=ConkyrcNumber,ConkyrcColour skipwhite
87 syn match ConkyrcColour /\S\@<!#[a-fA-F0-9]\{6\}\(\S\@!\|}\@=\)/
88       \ nextgroup=ConkyrcNumber,ConkyrcColour skipwhite
89
90 syn region ConkyrcText start=/^TEXT$/ end=/\%$/ contains=ConkyrcVar
91
92 syn region ConkyrcVar start=/\${/ end=/}/ contained contains=ConkyrcVarStuff
93 syn region ConkyrcVar start=/\$\w\@=/ end=/\W\@=\|$/ contained contains=ConkyrcVarName
94
95 syn match ConkyrcVarStuff /{\@<=/ms=s contained nextgroup=ConkyrcVarName
96
97 syn keyword ConkyrcVarName contained nextgroup=ConkyrcNumber,ConkyrcColour skipwhite
98         \ acpiacadapter
99         \ acpifan
100         \ acpitemp
101         \ acpitempf
102         \ addr
103         \ adt746xcpu
104         \ adt746xfan
105         \ alignc
106         \ alignr
107         \ apm_adapter
108         \ apm_battery_life
109         \ apm_battery_time
110         \ audacious_bar
111         \ audacious_bitrate
112         \ audacious_channels
113         \ audacious_filename
114         \ audacious_frequency
115         \ audacious_length
116         \ audacious_length_seconds
117         \ audacious_playlist_length
118         \ audacious_playlist_position
119         \ audacious_position
120         \ audacious_position_seconds
121         \ audacious_status
122         \ audacious_title
123         \ battery
124         \ battery_time
125         \ bmpx_album
126         \ bmpx_artist
127         \ bmpx_bitrate
128         \ bmpx_title
129         \ bmpx_track
130         \ bmpx_uri
131         \ buffers
132         \ cached
133         \ color
134         \ colour
135         \ cpu
136         \ cpubar
137         \ cpugraph
138         \ diskio
139         \ diskiograph
140         \ downspeed
141         \ downspeedf
142         \ downspeedgraph
143         \ else
144         \ entropy_avail
145         \ entropy_bar
146         \ entropy_poolsize
147         \ exec
148         \ execbar
149         \ execgraph
150         \ execi
151         \ execibar
152         \ execigraph
153         \ font
154         \ freq
155         \ freq_dyn
156         \ freq_dyn_g
157         \ freq_g
158         \ fs_bar
159         \ fs_free
160         \ fs_free_perc
161         \ fs_size
162         \ fs_used
163         \ goto
164         \ hddtemp
165         \ head
166         \ hr
167         \ hwmon
168         \ i2c
169         \ i8k_ac_status
170         \ i8k_bios
171         \ i8k_buttons_status
172         \ i8k_cpu_temp
173         \ i8k_cpu_tempf
174         \ i8k_left_fan_rpm
175         \ i8k_left_fan_status
176         \ i8k_right_fan_rpm
177         \ i8k_right_fan_status
178         \ i8k_serial
179         \ i8k_version
180         \ if_existing
181         \ if_mounted
182         \ if_running
183         \ kernel
184         \ linkstatus
185         \ loadavg
186         \ machine
187         \ mails
188         \ mem
189         \ membar
190         \ memmax
191         \ memperc
192         \ mpd_album
193         \ mpd_artist
194         \ mpd_bar
195         \ mpd_bitrate
196         \ mpd_elapsed
197         \ mpd_file
198         \ mpd_length
199         \ mpd_name
200         \ mpd_percent
201         \ mpd_smart
202         \ mpd_status
203         \ mpd_title
204         \ mpd_vol
205         \ new_mails
206         \ nodename
207         \ offset
208         \ outlinecolor
209         \ platform
210         \ pre_exec
211         \ processes
212         \ running_processes
213         \ shadecolor
214         \ stippled_hr
215         \ swap
216         \ swapbar
217         \ swapmax
218         \ swapperc
219         \ sysname
220         \ tab
221         \ tail
222         \ tcp_portmon
223         \ texeci
224         \ time
225         \ top
226         \ top_mem
227         \ totaldown
228         \ totalup
229         \ tztime
230         \ updates
231         \ upspeed
232         \ upspeedf
233         \ upspeedgraph
234         \ uptime
235         \ uptime_short
236         \ voffset
237         \ voltage_mv
238         \ voltage_v
239
240 hi def link ConkyrcComment   Comment
241 hi def link ConkyrcSetting   Keyword
242 hi def link ConkyrcConstant  Constant
243 hi def link ConkyrcNumber    Number
244 hi def link ConkyrcColour    Special
245
246 hi def link ConkyrcText      String
247 hi def link ConkyrcVar       Identifier
248 hi def link ConkyrcVarName   Keyword
249
250 let b:current_syntax = "conkyrc"