annotate runtime/syntax/cfg.vim @ 2045:e77e3c11f507 v7.2.331

updated for version 7.2.331 Problem: Can't interrupt "echo list" for a very long list. Solution: Call line_breakcheck() in list_join().
author Bram Moolenaar <bram@zimbu.org>
date Tue, 19 Jan 2010 12:48:05 +0100
parents 3fc0f57ecb91
children 536aa8b0c934
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: Good old CFG files
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Igor N. Prischepoff (igor@tyumbit.ru, pri_igor@mail.ru)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last change: 2001 Sep 02
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 elseif exists ("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 " case off
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 syn keyword CfgOnOff ON OFF YES NO TRUE FALSE contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 syn match UncPath "\\\\\p*" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 "Dos Drive:\Path
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn match CfgDirectory "[a-zA-Z]:\\\p*" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 "Parameters
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn match CfgParams ".*="me=e-1 contains=CfgComment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 "... and their values (don't want to highlight '=' sign)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn match CfgValues "=.*"hs=s+1 contains=CfgDirectory,UncPath,CfgComment,CfgString,CfgOnOff
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 " Sections
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn match CfgSection "\[.*\]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn match CfgSection "{.*}"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 " String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn match CfgString "\".*\"" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn match CfgString "'.*'" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 " Comments (Everything before '#' or '//' or ';')
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn match CfgComment "#.*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn match CfgComment ";.*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn match CfgComment "\/\/.*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 " Define the default hightlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 if version >= 508 || !exists("did_cfg_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 let did_cfg_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 HiLink CfgOnOff Label
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 HiLink CfgComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 HiLink CfgSection Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 HiLink CfgString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 HiLink CfgParams Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 HiLink CfgValues Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 HiLink CfgDirectory Directory
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 HiLink UncPath Directory
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 let b:current_syntax = "cfg"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 " vim:ts=8