Mercurial > vim
annotate runtime/syntax/clean.vim @ 10048:43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 30 23:26:57 2016 +0200
Updated runtime files. Remove version checks for Vim older than 6.0.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 30 Aug 2016 23:30:09 +0200 |
parents | 9521463d4fc1 |
children | 46763b01cd9a |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: Clean | |
3 " Author: Pieter van Engelen <pietere@sci.kun.nl> | |
4 " Co-Author: Arthur van Leeuwen <arthurvl@sci.kun.nl> | |
5425 | 5 " Last Change: 2013 Oct 15 by Jurriƫn Stutterheim |
7 | 6 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5425
diff
changeset
|
7 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5425
diff
changeset
|
8 if exists("b:current_syntax") |
7 | 9 finish |
10 endif | |
11 | |
3237 | 12 let s:cpo_save = &cpo |
13 set cpo&vim | |
14 | |
7 | 15 " Some Clean-keywords |
16 syn keyword cleanConditional if case | |
17 syn keyword cleanLabel let! with where in of | |
18 syn keyword cleanSpecial Start | |
19 syn keyword cleanKeyword infixl infixr infix | |
20 syn keyword cleanBasicType Int Real Char Bool String | |
21 syn keyword cleanSpecialType World ProcId Void Files File | |
22 syn keyword cleanModuleSystem module implementation definition system | |
23 syn keyword cleanTypeClass class instance export | |
24 | |
4992 | 25 " Import highlighting |
26 syn region cleanIncludeRegion start="^\s*\(from\|import\|\s\+\(as\|qualified\)\)" end="\n" contains=cleanIncludeKeyword keepend | |
27 syn keyword cleanIncludeKeyword contained from import as qualified | |
28 | |
7 | 29 " To do some Denotation Highlighting |
30 syn keyword cleanBoolDenot True False | |
5425 | 31 syn region cleanStringDenot start=+"+ skip=+\(\(\\\\\)\+\|\\"\)+ end=+"+ display |
32 syn match cleanCharDenot "'\(\\\\\|\\'\|[^'\\]\)\+'" display | |
33 syn match cleanIntegerDenot "[\~+-]\?\<\(\d\+\|0[0-7]\+\|0x[0-9A-Fa-f]\+\)\>" display | |
34 syn match cleanRealDenot "[\~+-]\?\d\+\.\d\+\(E[\~+-]\?\d\+\)\?" display | |
7 | 35 |
36 " To highlight the use of lists, tuples and arrays | |
37 syn region cleanList start="\[" end="\]" contains=ALL | |
38 syn region cleanRecord start="{" end="}" contains=ALL | |
39 syn region cleanArray start="{:" end=":}" contains=ALL | |
40 syn match cleanTuple "([^=]*,[^=]*)" contains=ALL | |
41 | |
42 " To do some Comment Highlighting | |
5425 | 43 syn region cleanComment start="/\*" end="\*/" contains=cleanComment,cleanTodo fold |
44 syn region cleanComment start="//.*" end="$" display contains=cleanTodo | |
45 syn keyword cleanTodo TODO FIXME XXX contained | |
7 | 46 |
5425 | 47 " Now for some useful type definition recognition |
48 syn match cleanFuncTypeDef "\([a-zA-Z].*\|(\=[-~@#$%^?!+*<>\/|&=:]\+)\=\)\s*\(infix[lr]\=\)\=\s*\d\=\s*::.*->.*" contains=cleanSpecial,cleanBasicType,cleanSpecialType,cleanKeyword | |
49 | |
7 | 50 |
51 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5425
diff
changeset
|
52 " Only when an item doesn't have highlighting yet |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5425
diff
changeset
|
53 command -nargs=+ HiLink hi def link <args> |
7 | 54 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5425
diff
changeset
|
55 " Comments |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5425
diff
changeset
|
56 HiLink cleanComment Comment |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5425
diff
changeset
|
57 " Constants and denotations |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5425
diff
changeset
|
58 HiLink cleanStringDenot String |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5425
diff
changeset
|
59 HiLink cleanCharDenot Character |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5425
diff
changeset
|
60 HiLink cleanIntegerDenot Number |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5425
diff
changeset
|
61 HiLink cleanBoolDenot Boolean |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5425
diff
changeset
|
62 HiLink cleanRealDenot Float |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5425
diff
changeset
|
63 " Identifiers |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5425
diff
changeset
|
64 " Statements |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5425
diff
changeset
|
65 HiLink cleanTypeClass Keyword |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5425
diff
changeset
|
66 HiLink cleanConditional Conditional |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5425
diff
changeset
|
67 HiLink cleanLabel Label |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5425
diff
changeset
|
68 HiLink cleanKeyword Keyword |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5425
diff
changeset
|
69 " Generic Preprocessing |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5425
diff
changeset
|
70 HiLink cleanIncludeKeyword Include |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5425
diff
changeset
|
71 HiLink cleanModuleSystem PreProc |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5425
diff
changeset
|
72 " Type |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5425
diff
changeset
|
73 HiLink cleanBasicType Type |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5425
diff
changeset
|
74 HiLink cleanSpecialType Type |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5425
diff
changeset
|
75 HiLink cleanFuncTypeDef Typedef |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5425
diff
changeset
|
76 " Special |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5425
diff
changeset
|
77 HiLink cleanSpecial Special |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5425
diff
changeset
|
78 HiLink cleanList Special |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5425
diff
changeset
|
79 HiLink cleanArray Special |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5425
diff
changeset
|
80 HiLink cleanRecord Special |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5425
diff
changeset
|
81 HiLink cleanTuple Special |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5425
diff
changeset
|
82 " Error |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5425
diff
changeset
|
83 " Todo |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5425
diff
changeset
|
84 HiLink cleanTodo Todo |
7 | 85 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5425
diff
changeset
|
86 delcommand HiLink |
7 | 87 |
88 let b:current_syntax = "clean" | |
89 | |
3237 | 90 let &cpo = s:cpo_save |
91 unlet s:cpo_save | |
7 | 92 " vim: ts=4 |