Mercurial > vim
annotate runtime/syntax/cabal.vim @ 6383:9c9c70625444 v7.4.523
updated for version 7.4.523
Problem: When the X11 server is stopped and restarted, while Vim is kept in
the background, copy/paste no longer works. (Issue 203)
Solution: Setup the clipboard again. (Christian Brabandt)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 19 Nov 2014 18:48:46 +0100 |
parents | a8afba7027ae |
children | 43efa4f5a8ea |
rev | line source |
---|---|
2152 | 1 " Vim syntax file |
2 " Language: Haskell Cabal Build file | |
3 " Maintainer: Vincent Berthoux <twinside@gmail.com> | |
4 " File Types: .cabal | |
2206
a8afba7027ae
Add extra floating point functions.
Bram Moolenaar <bram@vim.org>
parents:
2152
diff
changeset
|
5 " Last Change: 2010 May 18 |
2152 | 6 " v1.3: Updated to the last version of cabal |
7 " Added more highlighting for cabal function, true/false | |
8 " and version number. Also added missing comment highlighting. | |
9 " Cabal known compiler are highlighted too. | |
10 " | |
11 " V1.2: Added cpp-options which was missing. Feature implemented | |
12 " by GHC, found with a GHC warning, but undocumented. | |
13 " Whatever... | |
14 " | |
15 " v1.1: Fixed operator problems and added ftdetect file | |
16 " (thanks to Sebastian Schwarz) | |
17 " | |
18 " v1.0: Cabal syntax in vimball format | |
19 " (thanks to Magnus Therning) | |
20 | |
21 " For version 5.x: Clear all syntax items | |
22 " For version 6.x: Quit when a syntax file was already loaded | |
23 if version < 600 | |
24 syntax clear | |
25 elseif exists("b:current_syntax") | |
26 finish | |
27 endif | |
28 | |
29 syn keyword cabalCategory Library library Executable executable Flag flag | |
30 syn keyword cabalCategory source-repository Source-Repository | |
31 | |
32 syn keyword cabalConditional if else | |
33 syn match cabalOperator "&&\|||\|!\|==\|>=\|<=" | |
34 syn keyword cabalFunction os arche impl flag | |
35 syn match cabalComment /--.*$/ | |
36 syn match cabalVersion "\d\+\(.\(\d\)\+\)\+" | |
37 | |
38 syn match cabalTruth "\ctrue" | |
39 syn match cabalTruth "\cfalse" | |
40 | |
41 syn match cabalCompiler "\cghc" | |
42 syn match cabalCompiler "\cnhc" | |
43 syn match cabalCompiler "\cyhc" | |
44 syn match cabalCompiler "\chugs" | |
45 syn match cabalCompiler "\chbc" | |
46 syn match cabalCompiler "\chelium" | |
47 syn match cabalCompiler "\cjhc" | |
48 syn match cabalCompiler "\clhc" | |
49 | |
50 | |
51 syn match cabalStatement "\cauthor" | |
52 syn match cabalStatement "\cbranch" | |
53 syn match cabalStatement "\cbug-reports" | |
54 syn match cabalStatement "\cbuild-depends" | |
55 syn match cabalStatement "\cbuild-tools" | |
56 syn match cabalStatement "\cbuild-type" | |
57 syn match cabalStatement "\cbuildable" | |
58 syn match cabalStatement "\cc-sources" | |
59 syn match cabalStatement "\ccabal-version" | |
60 syn match cabalStatement "\ccategory" | |
61 syn match cabalStatement "\ccc-options" | |
62 syn match cabalStatement "\ccopyright" | |
63 syn match cabalStatement "\ccpp-options" | |
64 syn match cabalStatement "\cdata-dir" | |
65 syn match cabalStatement "\cdata-files" | |
66 syn match cabalStatement "\cdefault" | |
67 syn match cabalStatement "\cdescription" | |
68 syn match cabalStatement "\cexecutable" | |
69 syn match cabalStatement "\cexposed-modules" | |
70 syn match cabalStatement "\cexposed" | |
71 syn match cabalStatement "\cextensions" | |
72 syn match cabalStatement "\cextra-lib-dirs" | |
73 syn match cabalStatement "\cextra-libraries" | |
74 syn match cabalStatement "\cextra-source-files" | |
75 syn match cabalStatement "\cextra-tmp-files" | |
76 syn match cabalStatement "\cfor example" | |
77 syn match cabalStatement "\cframeworks" | |
78 syn match cabalStatement "\cghc-options" | |
79 syn match cabalStatement "\cghc-prof-options" | |
80 syn match cabalStatement "\cghc-shared-options" | |
81 syn match cabalStatement "\chomepage" | |
82 syn match cabalStatement "\chs-source-dirs" | |
83 syn match cabalStatement "\chugs-options" | |
84 syn match cabalStatement "\cinclude-dirs" | |
85 syn match cabalStatement "\cincludes" | |
86 syn match cabalStatement "\cinstall-includes" | |
87 syn match cabalStatement "\cld-options" | |
88 syn match cabalStatement "\clicense-file" | |
89 syn match cabalStatement "\clicense" | |
90 syn match cabalStatement "\clocation" | |
91 syn match cabalStatement "\cmain-is" | |
92 syn match cabalStatement "\cmaintainer" | |
93 syn match cabalStatement "\cmodule" | |
94 syn match cabalStatement "\cname" | |
95 syn match cabalStatement "\cnhc98-options" | |
96 syn match cabalStatement "\cother-modules" | |
97 syn match cabalStatement "\cpackage-url" | |
98 syn match cabalStatement "\cpkgconfig-depends" | |
99 syn match cabalStatement "\cstability" | |
100 syn match cabalStatement "\csubdir" | |
101 syn match cabalStatement "\csynopsis" | |
102 syn match cabalStatement "\ctag" | |
103 syn match cabalStatement "\ctested-with" | |
104 syn match cabalStatement "\ctype" | |
105 syn match cabalStatement "\cversion" | |
106 | |
107 " Define the default highlighting. | |
108 " For version 5.7 and earlier: only when not done already | |
109 " For version 5.8 and later: only when an item doesn't have highlighting yet | |
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 | |
118 HiLink cabalVersion Number | |
119 HiLink cabalTruth Boolean | |
120 HiLink cabalComment Comment | |
121 HiLink cabalStatement Statement | |
122 HiLink cabalCategory Type | |
123 HiLink cabalFunction Function | |
124 HiLink cabalConditional Conditional | |
125 HiLink cabalOperator Operator | |
126 HiLink cabalCompiler Constant | |
127 delcommand HiLink | |
128 endif | |
129 | |
130 let b:current_syntax = "cabal" | |
131 | |
132 " vim: ts=8 |