Merge branch 'vim-with-runtime' into feat/quickfix-title
[vim_extended.git] / runtime / syntax / cfg.vim
blobc6e8b29538b420f17417591b90cd83eedb65126e
1 " Vim syntax file
2 " Language:     Good old CFG files
3 " Maintainer:   Igor N. Prischepoff (igor@tyumbit.ru, pri_igor@mail.ru)
4 " Last change:  2001 Sep 02
6 " For version 5.x: Clear all syntax items
7 " For version 6.x: Quit when a syntax file was already loaded
8 if version < 600
9     syntax clear
10 elseif exists ("b:current_syntax")
11     finish
12 endif
14 " case off
15 syn case ignore
16 syn keyword CfgOnOff  ON OFF YES NO TRUE FALSE  contained
17 syn match UncPath "\\\\\p*" contained
18 "Dos Drive:\Path
19 syn match CfgDirectory "[a-zA-Z]:\\\p*" contained
20 "Parameters
21 syn match   CfgParams    ".*="me=e-1 contains=CfgComment
22 "... and their values (don't want to highlight '=' sign)
23 syn match   CfgValues    "=.*"hs=s+1 contains=CfgDirectory,UncPath,CfgComment,CfgString,CfgOnOff
25 " Sections
26 syn match CfgSection        "\[.*\]"
27 syn match CfgSection        "{.*}"
29 " String
30 syn match  CfgString    "\".*\"" contained
31 syn match  CfgString    "'.*'"   contained
33 " Comments (Everything before '#' or '//' or ';')
34 syn match  CfgComment   "#.*"
35 syn match  CfgComment   ";.*"
36 syn match  CfgComment   "\/\/.*"
38 " Define the default hightlighting.
39 " For version 5.7 and earlier: only when not done already
40 " For version 5.8 and later: only when an item doesn't have highlighting yet
41 if version >= 508 || !exists("did_cfg_syn_inits")
42     if version < 508
43         let did_cfg_syn_inits = 1
44         command -nargs=+ HiLink hi link <args>
45     else
46         command -nargs=+ HiLink hi def link <args>
47     endif
48     HiLink CfgOnOff     Label
49     HiLink CfgComment   Comment
50     HiLink CfgSection   Type
51     HiLink CfgString    String
52     HiLink CfgParams    Keyword
53     HiLink CfgValues    Constant
54     HiLink CfgDirectory Directory
55     HiLink UncPath      Directory
57     delcommand HiLink
58 endif
59 let b:current_syntax = "cfg"
60 " vim:ts=8