Mercurial > vim
annotate runtime/syntax/messages.vim @ 20310:fb099a566102
Added tag v8.2.0710 for changeset cae01dabd78e679e3f2170a7bf9781d10ca3fc3e
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 07 May 2020 18:30:05 +0200 |
parents | 41768bcebc9b |
children | 5b37a0bf7e3a |
rev | line source |
---|---|
1125 | 1 " Vim syntax file |
2 " Language: /var/log/messages file | |
3 " Maintainer: Yakov Lerner <iler.ml@gmail.com> | |
1668 | 4 " Latest Revision: 2008-06-29 |
5 " Changes: 2008-06-29 support for RFC3339 tuimestamps James Vega | |
7707
41768bcebc9b
commit https://github.com/vim/vim/commit/13d5aeef56e3140a8eb8f40c7062aa1c5700f76e
Christian Brabandt <cb@256bit.org>
parents:
1668
diff
changeset
|
6 " 2016 Jan 19: messagesDate changed by Bram |
1125 | 7 |
8 if exists("b:current_syntax") | |
9 finish | |
10 endif | |
11 | |
12 let s:cpo_save = &cpo | |
13 set cpo&vim | |
14 | |
1668 | 15 syn match messagesBegin display '^' nextgroup=messagesDate,messagesDateRFC3339 |
1125 | 16 |
7707
41768bcebc9b
commit https://github.com/vim/vim/commit/13d5aeef56e3140a8eb8f40c7062aa1c5700f76e
Christian Brabandt <cb@256bit.org>
parents:
1668
diff
changeset
|
17 syn match messagesDate contained display '[[:lower:][:upper:]][[:lower:][:upper:]][[:lower:][:upper:]] [ 0-9]\d *' |
1125 | 18 \ nextgroup=messagesHour |
19 | |
20 syn match messagesHour contained display '\d\d:\d\d:\d\d\s*' | |
21 \ nextgroup=messagesHost | |
22 | |
1668 | 23 syn match messagesDateRFC3339 contained display '\d\{4}-\d\d-\d\d' |
24 \ nextgroup=messagesRFC3339T | |
25 | |
26 syn match messagesRFC3339T contained display '\cT' | |
27 \ nextgroup=messagesHourRFC3339 | |
28 | |
29 syn match messagesHourRFC3339 contained display '\c\d\d:\d\d:\d\d\(\.\d\+\)\=\([+-]\d\d:\d\d\|Z\)' | |
30 \ nextgroup=messagesHost | |
31 | |
1125 | 32 syn match messagesHost contained display '\S*\s*' |
33 \ nextgroup=messagesLabel | |
34 | |
35 syn match messagesLabel contained display '\s*[^:]*:\s*' | |
36 \ nextgroup=messagesText contains=messagesKernel,messagesPID | |
37 | |
38 syn match messagesPID contained display '\[\zs\d\+\ze\]' | |
39 | |
40 syn match messagesKernel contained display 'kernel:' | |
41 | |
42 | |
43 syn match messagesIP '\d\+\.\d\+\.\d\+\.\d\+' | |
44 | |
45 syn match messagesURL '\w\+://\S\+' | |
46 | |
47 syn match messagesText contained display '.*' | |
48 \ contains=messagesNumber,messagesIP,messagesURL,messagesError | |
49 | |
50 syn match messagesNumber contained '0x[0-9a-fA-F]*\|\[<[0-9a-f]\+>\]\|\<\d[0-9a-fA-F]*' | |
51 | |
52 syn match messagesError contained '\c.*\<\(FATAL\|ERROR\|ERRORS\|FAILED\|FAILURE\).*' | |
53 | |
54 | |
55 hi def link messagesDate Constant | |
56 hi def link messagesHour Type | |
1668 | 57 hi def link messagesDateRFC3339 Constant |
58 hi def link messagesHourRFC3339 Type | |
59 hi def link messagesRFC3339T Normal | |
1125 | 60 hi def link messagesHost Identifier |
61 hi def link messagesLabel Operator | |
62 hi def link messagesPID Constant | |
63 hi def link messagesKernel Special | |
64 hi def link messagesError ErrorMsg | |
65 hi def link messagesIP Constant | |
66 hi def link messagesURL Underlined | |
67 hi def link messagesText Normal | |
68 hi def link messagesNumber Number | |
69 | |
70 let b:current_syntax = "messages" | |
71 | |
72 let &cpo = s:cpo_save | |
73 unlet s:cpo_save |