Mercurial > hg > RemoteEditor > vim7
annotate runtime/syntax/messages.vim @ 34:e170173ecb68 current-release
before ack base protocol.
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 26 Nov 2008 15:02:10 +0900 |
parents | 76efa0be13f1 |
children |
rev | line source |
---|---|
0 | 1 " Vim syntax file |
2 " Language: /var/log/messages file | |
3 " Maintainer: Yakov Lerner <iler.ml@gmail.com> | |
34
e170173ecb68
before ack base protocol.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
4 " Latest Revision: 2008-06-29 |
e170173ecb68
before ack base protocol.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
5 " Changes: 2008-06-29 support for RFC3339 tuimestamps James Vega |
0 | 6 |
7 if exists("b:current_syntax") | |
8 finish | |
9 endif | |
10 | |
11 let s:cpo_save = &cpo | |
12 set cpo&vim | |
13 | |
34
e170173ecb68
before ack base protocol.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
14 syn match messagesBegin display '^' nextgroup=messagesDate,messagesDateRFC3339 |
0 | 15 |
16 syn match messagesDate contained display '\a\a\a [ 0-9]\d *' | |
17 \ nextgroup=messagesHour | |
18 | |
19 syn match messagesHour contained display '\d\d:\d\d:\d\d\s*' | |
20 \ nextgroup=messagesHost | |
21 | |
34
e170173ecb68
before ack base protocol.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
22 syn match messagesDateRFC3339 contained display '\d\{4}-\d\d-\d\d' |
e170173ecb68
before ack base protocol.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
23 \ nextgroup=messagesRFC3339T |
e170173ecb68
before ack base protocol.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
24 |
e170173ecb68
before ack base protocol.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
25 syn match messagesRFC3339T contained display '\cT' |
e170173ecb68
before ack base protocol.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
26 \ nextgroup=messagesHourRFC3339 |
e170173ecb68
before ack base protocol.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
27 |
e170173ecb68
before ack base protocol.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
28 syn match messagesHourRFC3339 contained display '\c\d\d:\d\d:\d\d\(\.\d\+\)\=\([+-]\d\d:\d\d\|Z\)' |
e170173ecb68
before ack base protocol.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
29 \ nextgroup=messagesHost |
e170173ecb68
before ack base protocol.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
30 |
0 | 31 syn match messagesHost contained display '\S*\s*' |
32 \ nextgroup=messagesLabel | |
33 | |
34 syn match messagesLabel contained display '\s*[^:]*:\s*' | |
35 \ nextgroup=messagesText contains=messagesKernel,messagesPID | |
36 | |
37 syn match messagesPID contained display '\[\zs\d\+\ze\]' | |
38 | |
39 syn match messagesKernel contained display 'kernel:' | |
40 | |
41 | |
42 syn match messagesIP '\d\+\.\d\+\.\d\+\.\d\+' | |
43 | |
44 syn match messagesURL '\w\+://\S\+' | |
45 | |
46 syn match messagesText contained display '.*' | |
47 \ contains=messagesNumber,messagesIP,messagesURL,messagesError | |
48 | |
49 syn match messagesNumber contained '0x[0-9a-fA-F]*\|\[<[0-9a-f]\+>\]\|\<\d[0-9a-fA-F]*' | |
50 | |
51 syn match messagesError contained '\c.*\<\(FATAL\|ERROR\|ERRORS\|FAILED\|FAILURE\).*' | |
52 | |
53 | |
54 hi def link messagesDate Constant | |
55 hi def link messagesHour Type | |
34
e170173ecb68
before ack base protocol.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
56 hi def link messagesDateRFC3339 Constant |
e170173ecb68
before ack base protocol.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
57 hi def link messagesHourRFC3339 Type |
e170173ecb68
before ack base protocol.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
58 hi def link messagesRFC3339T Normal |
0 | 59 hi def link messagesHost Identifier |
60 hi def link messagesLabel Operator | |
61 hi def link messagesPID Constant | |
62 hi def link messagesKernel Special | |
63 hi def link messagesError ErrorMsg | |
64 hi def link messagesIP Constant | |
65 hi def link messagesURL Underlined | |
66 hi def link messagesText Normal | |
67 hi def link messagesNumber Number | |
68 | |
69 let b:current_syntax = "messages" | |
70 | |
71 let &cpo = s:cpo_save | |
72 unlet s:cpo_save |