Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
10047:a62862410ca1 | 10048:43efa4f5a8ea |
---|---|
2 " Language: Clean | 2 " Language: Clean |
3 " Author: Pieter van Engelen <pietere@sci.kun.nl> | 3 " Author: Pieter van Engelen <pietere@sci.kun.nl> |
4 " Co-Author: Arthur van Leeuwen <arthurvl@sci.kun.nl> | 4 " Co-Author: Arthur van Leeuwen <arthurvl@sci.kun.nl> |
5 " Last Change: 2013 Oct 15 by Jurriën Stutterheim | 5 " Last Change: 2013 Oct 15 by Jurriën Stutterheim |
6 | 6 |
7 " For version 5.x: Clear all syntax items | 7 " quit when a syntax file was already loaded |
8 " For version 6.x: Quit when a syntax file was already loaded | 8 if exists("b:current_syntax") |
9 if version < 600 | |
10 syntax clear | |
11 elseif exists("b:current_syntax") | |
12 finish | 9 finish |
13 endif | 10 endif |
14 | 11 |
15 let s:cpo_save = &cpo | 12 let s:cpo_save = &cpo |
16 set cpo&vim | 13 set cpo&vim |
50 " Now for some useful type definition recognition | 47 " Now for some useful type definition recognition |
51 syn match cleanFuncTypeDef "\([a-zA-Z].*\|(\=[-~@#$%^?!+*<>\/|&=:]\+)\=\)\s*\(infix[lr]\=\)\=\s*\d\=\s*::.*->.*" contains=cleanSpecial,cleanBasicType,cleanSpecialType,cleanKeyword | 48 syn match cleanFuncTypeDef "\([a-zA-Z].*\|(\=[-~@#$%^?!+*<>\/|&=:]\+)\=\)\s*\(infix[lr]\=\)\=\s*\d\=\s*::.*->.*" contains=cleanSpecial,cleanBasicType,cleanSpecialType,cleanKeyword |
52 | 49 |
53 | 50 |
54 " Define the default highlighting. | 51 " Define the default highlighting. |
55 " For version 5.7 and earlier: only when not done already | 52 " Only when an item doesn't have highlighting yet |
56 " For version 5.8 and later: only when an item doesn't have highlighting yet | 53 command -nargs=+ HiLink hi def link <args> |
57 if version >= 508 || !exists("did_clean_syntax_init") | |
58 if version < 508 | |
59 let did_clean_syntax_init = 1 | |
60 command -nargs=+ HiLink hi link <args> | |
61 else | |
62 command -nargs=+ HiLink hi def link <args> | |
63 endif | |
64 | 54 |
65 " Comments | 55 " Comments |
66 HiLink cleanComment Comment | 56 HiLink cleanComment Comment |
67 " Constants and denotations | 57 " Constants and denotations |
68 HiLink cleanStringDenot String | 58 HiLink cleanStringDenot String |
69 HiLink cleanCharDenot Character | 59 HiLink cleanCharDenot Character |
70 HiLink cleanIntegerDenot Number | 60 HiLink cleanIntegerDenot Number |
71 HiLink cleanBoolDenot Boolean | 61 HiLink cleanBoolDenot Boolean |
72 HiLink cleanRealDenot Float | 62 HiLink cleanRealDenot Float |
73 " Identifiers | 63 " Identifiers |
74 " Statements | 64 " Statements |
75 HiLink cleanTypeClass Keyword | 65 HiLink cleanTypeClass Keyword |
76 HiLink cleanConditional Conditional | 66 HiLink cleanConditional Conditional |
77 HiLink cleanLabel Label | 67 HiLink cleanLabel Label |
78 HiLink cleanKeyword Keyword | 68 HiLink cleanKeyword Keyword |
79 " Generic Preprocessing | 69 " Generic Preprocessing |
80 HiLink cleanIncludeKeyword Include | 70 HiLink cleanIncludeKeyword Include |
81 HiLink cleanModuleSystem PreProc | 71 HiLink cleanModuleSystem PreProc |
82 " Type | 72 " Type |
83 HiLink cleanBasicType Type | 73 HiLink cleanBasicType Type |
84 HiLink cleanSpecialType Type | 74 HiLink cleanSpecialType Type |
85 HiLink cleanFuncTypeDef Typedef | 75 HiLink cleanFuncTypeDef Typedef |
86 " Special | 76 " Special |
87 HiLink cleanSpecial Special | 77 HiLink cleanSpecial Special |
88 HiLink cleanList Special | 78 HiLink cleanList Special |
89 HiLink cleanArray Special | 79 HiLink cleanArray Special |
90 HiLink cleanRecord Special | 80 HiLink cleanRecord Special |
91 HiLink cleanTuple Special | 81 HiLink cleanTuple Special |
92 " Error | 82 " Error |
93 " Todo | 83 " Todo |
94 HiLink cleanTodo Todo | 84 HiLink cleanTodo Todo |
95 | 85 |
96 delcommand HiLink | 86 delcommand HiLink |
97 endif | |
98 | 87 |
99 let b:current_syntax = "clean" | 88 let b:current_syntax = "clean" |
100 | 89 |
101 let &cpo = s:cpo_save | 90 let &cpo = s:cpo_save |
102 unlet s:cpo_save | 91 unlet s:cpo_save |