syntax files
[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         \ mail_spool
34         \ max_user_text
35         \ maximum_width
36         \ minimum_size
37         \ min_port_monitor_connections
38         \ min_port_monitors
39         \ mpd_host
40         \ mpd_password
41         \ mpd_port
42         \ net_avg_samples
43         \ no_buffers
44         \ out_to_console
45         \ override_utf8_locale
46         \ own_window
47         \ own_window_colour
48         \ own_window_hints
49         \ own_window_transparent
50         \ own_window_type
51         \ pad_percents
52         \ stippled_borders
53         \ total_run_times
54         \ update_interval
55         \ uppercase
56         \ use_spacer
57         \ use_xft
58         \ wm_class_name
59         \ xftalpha
60         \ xftfont
61
62 syn keyword ConkyrcConstant 
63         \ above
64         \ below
65         \ bottom_left
66         \ bottom_right
67         \ desktop
68         \ no
69         \ none
70         \ normal
71         \ override
72         \ skip_pager
73         \ skip_taskbar
74         \ sticky
75         \ top_left
76         \ top_right
77         \ undecorated
78         \ yes
79
80 syn match ConkyrcNumber /\S\@<!\d\+\(\.\d\+\)\?\(\S\@!\|}\@=\)/
81       \ nextgroup=ConkyrcNumber,ConkyrcColour skipwhite
82 syn match ConkyrcColour /\S\@<!#[a-fA-F0-9]\{6\}\(\S\@!\|}\@=\)/
83       \ nextgroup=ConkyrcNumber,ConkyrcColour skipwhite
84
85 syn region ConkyrcText start=/^TEXT$/ end=/\%$/ contains=ConkyrcVar
86
87 syn region ConkyrcVar start=/\${/ end=/}/ contained contains=ConkyrcVarStuff
88 syn region ConkyrcVar start=/\$\w\@=/ end=/\W\@=\|$/ contained contains=ConkyrcVarName
89
90 syn match ConkyrcVarStuff /{\@<=/ms=s contained nextgroup=ConkyrcVarName
91
92 syn keyword ConkyrcVarName contained nextgroup=ConkyrcNumber,ConkyrcColour skipwhite
93         \ acpiacadapter 
94         \ acpifan 
95         \ acpitemp 
96         \ acpitempf 
97         \ addr 
98         \ adt746xcpu
99         \ adt746xfan 
100         \ alignc 
101         \ alignr 
102         \ apm_adapter 
103         \ apm_battery_life 
104         \ apm_battery_time
105         \ audacious_bar
106         \ audacious_bitrate
107         \ audacious_channels
108         \ audacious_filename
109         \ audacious_frequency
110         \ audacious_length
111         \ audacious_length_seconds
112         \ audacious_playlist_length
113         \ audacious_playlist_position
114         \ audacious_position
115         \ audacious_position_seconds
116         \ audacious_status
117         \ audacious_title
118         \ battery 
119         \ bmpx_album 
120         \ bmpx_artist 
121         \ bmpx_bitrate
122         \ bmpx_title 
123         \ bmpx_track 
124         \ bmpx_uri 
125         \ buffers 
126         \ cached 
127         \ color 
128         \ colour 
129         \ cpu 
130         \ cpubar 
131         \ diskio 
132         \ downspeed 
133         \ downspeedf
134         \ else 
135         \ exec 
136         \ execbar 
137         \ execgraph 
138         \ execi 
139         \ execibar 
140         \ execigraph 
141         \ font 
142         \ freq
143         \ freq_dyn 
144         \ freq_dyn_g 
145         \ freq_g 
146         \ fs_bar 
147         \ fs_free 
148         \ fs_free_perc 
149         \ fs_size 
150         \ fs_used 
151         \ goto
152         \ hddtemp
153         \ head
154         \ hr 
155         \ i2c 
156         \ i8k_ac_status 
157         \ i8k_bios 
158         \ i8k_buttons_status 
159         \ i8k_cpu_temp 
160         \ i8k_cpu_tempf
161         \ i8k_left_fan_rpm 
162         \ i8k_left_fan_status 
163         \ i8k_right_fan_rpm 
164         \ i8k_right_fan_status
165         \ i8k_serial 
166         \ i8k_version 
167         \ if_existing 
168         \ if_mounted 
169         \ if_running 
170         \ kernel 
171         \ linkstatus 
172         \ loadavg
173         \ machine 
174         \ mails 
175         \ mem 
176         \ membar 
177         \ memmax 
178         \ memperc 
179         \ mpd_album 
180         \ mpd_artist 
181         \ mpd_bar 
182         \ mpd_bitrate 
183         \ mpd_elapsed
184         \ mpd_file
185         \ mpd_length 
186         \ mpd_name
187         \ mpd_percent 
188         \ mpd_smart
189         \ mpd_status 
190         \ mpd_title
191         \ mpd_vol 
192         \ new_mails 
193         \ nodename 
194         \ offset 
195         \ outlinecolor 
196         \ pre_exec 
197         \ processes
198         \ running_processes 
199         \ shadecolor 
200         \ stippled_hr 
201         \ swap 
202         \ swapbar 
203         \ swapmax 
204         \ swapperc 
205         \ sysname
206         \ tab
207         \ tail 
208         \ tcp_portmon 
209         \ texeci 
210         \ time 
211         \ top 
212         \ top_mem 
213         \ totaldown 
214         \ totalup 
215         \ tztime
216         \ updates 
217         \ upspeed 
218         \ upspeedf
219         \ upspeedgraph 
220         \ uptime 
221         \ uptime_short 
222         \ voffset
223         \ voltage_mv
224         \ voltage_v
225
226 hi def link ConkyrcComment   Comment
227 hi def link ConkyrcSetting   Keyword
228 hi def link ConkyrcConstant  Constant
229 hi def link ConkyrcNumber    Number
230 hi def link ConkyrcColour    Special
231
232 hi def link ConkyrcText      String
233 hi def link ConkyrcVar       Identifier
234 hi def link ConkyrcVarName   Keyword
235
236 let b:current_syntax = "conkyrc"
237