diff options
Diffstat (limited to 'share/vim/syntax/prep.vim')
-rw-r--r-- | share/vim/syntax/prep.vim | 57 |
1 files changed, 38 insertions, 19 deletions
diff --git a/share/vim/syntax/prep.vim b/share/vim/syntax/prep.vim index 9044267..d801602 100644 --- a/share/vim/syntax/prep.vim +++ b/share/vim/syntax/prep.vim | |||
@@ -1,27 +1,46 @@ | |||
1 | " Vim syntax file | 1 | " Vim syntax file |
2 | " Language: PREP as used by PHT, PML, ibiza and Multilingual Markup (MLM) | 2 | " Language: PREP, the chilled multi-purpose preprocessor |
3 | " as used with HTML (PHT), Multilingual Markup (MLM) | ||
4 | " but also with apache config files and more. | ||
5 | " | ||
3 | " Maintainer: carlo von lynX | 6 | " Maintainer: carlo von lynX |
4 | " Latest Revision: 2016-08-25 | 7 | " Latest Revision: 2016-08-25 |
5 | 8 | ||
6 | " We may intentionally want to add upon HTML or other syntaxes! | 9 | if exists("b:current_syntax") |
7 | "if exists("b:current_syntax") | 10 | finish |
8 | " finish | 11 | endif |
9 | "endif | 12 | |
10 | 13 | " some variants of pht support wiki-like linking syntaxes additionally | |
11 | syn match mlmInline /((([a-z_]\+.*)))/ | 14 | " doesn't hurt to mark them up |
12 | syn match mlmComment /^# .*$/ | 15 | syn match prepWikiLink /\[http.\+\]/ |
13 | syn match mlmComment /^##.*$/ | 16 | |
14 | syn match mlmFlag /^[A-Z]\+)/ | 17 | " the inline processing syntax of prep is pretty unique, it allows to |
15 | syn match mlmStatement /^#[a-z_]\+/ | 18 | " embed anything anywhere and it never ended up colliding with other |
16 | syn match mlmFlagStatement /^[A-Z]\+)#[a-z_]\+/ | 19 | " syntax |
17 | 20 | syn match prepInline /((([a-z_]\+.*)))/ | |
18 | hi def link mlmStatement PreProc | 21 | |
19 | hi def link mlmFlagStatement Statement | 22 | " slightly tricky when # is both cpp-like preprocessor statement and |
20 | hi def link mlmFlag Constant | 23 | " comment character in all other cases |
21 | hi def link mlmInline Identifier | 24 | syn match prepStatement /^#[a-z_]\+/ |
25 | syn match prepComment /^# .*$/ | ||
26 | syn match prepComment /^##.*$/ | ||
27 | |||
28 | " rudimentary syntax, but the only bearable way to handle multilingual | ||
29 | " content. have you looked at .PO or XLIFF? just terrible. | ||
30 | syn match prepFlag /^[A-Z]\+)/ | ||
31 | |||
32 | " prep allows preprocessor statements depending on flags | ||
33 | syn match prepFlagStatement /^[A-Z]\+)#[a-z_]\+/ | ||
34 | syn match prepFlagStatement /^[A-Z]\+)#[a-z_]\+/ | ||
35 | |||
36 | hi def link prepStatement PreProc | ||
37 | hi def link prepFlagStatement Statement | ||
38 | hi def link prepFlag Constant | ||
39 | hi def link prepInline Identifier | ||
22 | " should be Comment, but it is not being | 40 | " should be Comment, but it is not being |
23 | " shown differently from regular text!? | 41 | " shown differently from regular text!? |
24 | hi def link mlmComment Type | 42 | hi def link prepComment Type |
43 | hi def link prepWikilink Constant | ||
25 | 44 | ||
26 | "let b:current_syntax = "prep" | 45 | let b:current_syntax = "prep" |
27 | 46 | ||