Mercurial > vim
annotate runtime/syntax/slrnsc.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 | 46763b01cd9a |
children |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: Slrn score file (based on slrn 0.9.8.0) | |
29 | 3 " Maintainer: Preben 'Peppe' Guldberg <peppe@wielders.org> |
4 " Last Change: 8 Oct 2004 | |
7 | 5 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
29
diff
changeset
|
6 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
29
diff
changeset
|
7 if exists("b:current_syntax") |
7 | 8 finish |
9 endif | |
10 | |
11 " characters in newsgroup names | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
29
diff
changeset
|
12 setlocal isk=@,48-57,.,-,_,+ |
7 | 13 |
14 syn match slrnscComment "%.*$" | |
15 syn match slrnscSectionCom ".].*"lc=2 | |
16 | |
17 syn match slrnscGroup contained "\(\k\|\*\)\+" | |
18 syn match slrnscNumber contained "\d\+" | |
19 syn match slrnscDate contained "\(\d\{1,2}[-/]\)\{2}\d\{4}" | |
20 syn match slrnscDelim contained ":" | |
21 syn match slrnscComma contained "," | |
22 syn match slrnscOper contained "\~" | |
23 syn match slrnscEsc contained "\\[ecC<>.]" | |
24 syn match slrnscEsc contained "[?^]" | |
25 syn match slrnscEsc contained "[^\\]$\s*$"lc=1 | |
26 | |
27 syn keyword slrnscInclude contained include | |
28 syn match slrnscIncludeLine "^\s*Include\s\+\S.*$" | |
29 | |
30 syn region slrnscSection matchgroup=slrnscSectionStd start="^\s*\[" end='\]' contains=slrnscGroup,slrnscComma,slrnscSectionCom | |
31 syn region slrnscSection matchgroup=slrnscSectionNot start="^\s*\[\~" end='\]' contains=slrnscGroup,slrnscCommas,slrnscSectionCom | |
32 | |
33 syn keyword slrnscItem contained Age Bytes Date Expires From Has-Body Lines Message-Id Newsgroup References Subject Xref | |
34 | |
35 syn match slrnscScoreItem contained "%.*$" skipempty nextgroup=slrnscScoreItem contains=slrnscComment | |
36 syn match slrnscScoreItem contained "^\s*Expires:\s*\(\d\{1,2}[-/]\)\{2}\d\{4}\s*$" skipempty nextgroup=slrnscScoreItem contains=slrnscItem,slrnscDelim,slrnscDate | |
37 syn match slrnscScoreItem contained "^\s*\~\=\(Age\|Bytes\|Has-Body\|Lines\):\s*\d\+\s*$" skipempty nextgroup=slrnscScoreItem contains=slrnscOper,slrnscItem,slrnscDelim,slrnscNumber | |
38 syn match slrnscScoreItemFill contained ".*$" skipempty nextgroup=slrnscScoreItem contains=slrnscEsc | |
39 syn match slrnscScoreItem contained "^\s*\~\=\(Date\|From\|Message-Id\|Newsgroup\|References\|Subject\|Xref\):" nextgroup=slrnscScoreItemFill contains=slrnscOper,slrnscItem,slrnscDelim | |
40 syn region slrnscScoreItem contained matchgroup=Special start="^\s*\~\={::\=" end="^\s*}" skipempty nextgroup=slrnscScoreItem contains=slrnscScoreItem | |
41 | |
42 syn keyword slrnscScore contained Score | |
43 syn match slrnscScoreIdent contained "%.*" | |
29 | 44 syn match slrnScoreLine "^\s*Score::\=\s\+=\=[-+]\=\d\+\s*\(%.*\)\=$" skipempty nextgroup=slrnscScoreItem contains=slrnscScore,slrnscDelim,slrnscOper,slrnscNumber,slrnscScoreIdent |
7 | 45 |
46 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
29
diff
changeset
|
47 " Only when an item doesn't have highlighting yet |
7 | 48 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
49 hi def link slrnscComment Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
50 hi def link slrnscSectionCom slrnscComment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
51 hi def link slrnscGroup String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
52 hi def link slrnscNumber Number |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
53 hi def link slrnscDate Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
54 hi def link slrnscDelim Delimiter |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
55 hi def link slrnscComma SpecialChar |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
56 hi def link slrnscOper SpecialChar |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
57 hi def link slrnscEsc String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
58 hi def link slrnscSectionStd Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
59 hi def link slrnscSectionNot Delimiter |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
60 hi def link slrnscItem Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
61 hi def link slrnscScore Keyword |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
62 hi def link slrnscScoreIdent Identifier |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
63 hi def link slrnscInclude Keyword |
7 | 64 |
65 | |
66 let b:current_syntax = "slrnsc" | |
67 | |
68 "EOF vim: ts=8 noet tw=200 sw=8 sts=0 |