Mercurial > vim
comparison runtime/syntax/cabal.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 | a8afba7027ae |
children | 46763b01cd9a |
comparison
equal
deleted
inserted
replaced
10047:a62862410ca1 | 10048:43efa4f5a8ea |
---|---|
16 " (thanks to Sebastian Schwarz) | 16 " (thanks to Sebastian Schwarz) |
17 " | 17 " |
18 " v1.0: Cabal syntax in vimball format | 18 " v1.0: Cabal syntax in vimball format |
19 " (thanks to Magnus Therning) | 19 " (thanks to Magnus Therning) |
20 | 20 |
21 " For version 5.x: Clear all syntax items | 21 " quit when a syntax file was already loaded |
22 " For version 6.x: Quit when a syntax file was already loaded | 22 if exists("b:current_syntax") |
23 if version < 600 | |
24 syntax clear | |
25 elseif exists("b:current_syntax") | |
26 finish | 23 finish |
27 endif | 24 endif |
28 | 25 |
29 syn keyword cabalCategory Library library Executable executable Flag flag | 26 syn keyword cabalCategory Library library Executable executable Flag flag |
30 syn keyword cabalCategory source-repository Source-Repository | 27 syn keyword cabalCategory source-repository Source-Repository |
103 syn match cabalStatement "\ctested-with" | 100 syn match cabalStatement "\ctested-with" |
104 syn match cabalStatement "\ctype" | 101 syn match cabalStatement "\ctype" |
105 syn match cabalStatement "\cversion" | 102 syn match cabalStatement "\cversion" |
106 | 103 |
107 " Define the default highlighting. | 104 " Define the default highlighting. |
108 " For version 5.7 and earlier: only when not done already | 105 " Only when an item doesn't have highlighting yet |
109 " For version 5.8 and later: only when an item doesn't have highlighting yet | 106 command -nargs=+ HiLink hi def link <args> |
110 if version >= 508 || !exists("did_cabal_syn_inits") | |
111 if version < 508 | |
112 let did_cabal_syn_inits = 1 | |
113 command -nargs=+ HiLink hi link <args> | |
114 else | |
115 command -nargs=+ HiLink hi def link <args> | |
116 endif | |
117 | 107 |
118 HiLink cabalVersion Number | 108 HiLink cabalVersion Number |
119 HiLink cabalTruth Boolean | 109 HiLink cabalTruth Boolean |
120 HiLink cabalComment Comment | 110 HiLink cabalComment Comment |
121 HiLink cabalStatement Statement | 111 HiLink cabalStatement Statement |
122 HiLink cabalCategory Type | 112 HiLink cabalCategory Type |
123 HiLink cabalFunction Function | 113 HiLink cabalFunction Function |
124 HiLink cabalConditional Conditional | 114 HiLink cabalConditional Conditional |
125 HiLink cabalOperator Operator | 115 HiLink cabalOperator Operator |
126 HiLink cabalCompiler Constant | 116 HiLink cabalCompiler Constant |
127 delcommand HiLink | 117 delcommand HiLink |
128 endif | |
129 | 118 |
130 let b:current_syntax = "cabal" | 119 let b:current_syntax = "cabal" |
131 | 120 |
132 " vim: ts=8 | 121 " vim: ts=8 |