xref: /vim-8.2.3635/runtime/syntax/dosini.vim (revision 5302d9eb)
1" Vim syntax file
2" Language:               Configuration File (ini file) for MSDOS/MS Windows
3" Version:                2.0
4" Original Author:        Sean M. McKee <[email protected]>
5" Previous Maintainer:    Nima Talebi <[email protected]>
6" Current Maintainer:     Hong Xu <[email protected]>
7" Last Change:            2011 Jul 21
8
9
10" For version 5.x: Clear all syntax items
11" For version 6.x: Quit when a syntax file was already loaded
12if version < 600
13  syntax clear
14elseif exists("b:current_syntax")
15  finish
16endif
17
18" shut case off
19syn case ignore
20
21syn match  dosiniBool     "\<\(yes\|no\|y\|n\|true\|false\)\>"
22syn match  dosiniNumber   "\<\d\+\>"
23syn match  dosiniNumber   "\<\d*\.\d\+\>"
24syn match  dosiniNumber   "\<\d\+e[+-]\=\d\+\>"
25syn match  dosiniLabel    "^.\{-}="
26syn region dosiniHeader   start="^\s*\[" end="\]"
27syn match  dosiniComment  "^[#;].*$"
28
29" Define the default highlighting.
30" For version 5.7 and earlier: only when not done already
31" For version 5.8 and later: only when an item doesn't have highlighting yet
32if version >= 508 || !exists("did_dosini_syntax_inits")
33  if version < 508
34    let did_dosini_syntax_inits = 1
35    command -nargs=+ HiLink hi link <args>
36  else
37    command -nargs=+ HiLink hi def link <args>
38  endif
39
40  HiLink dosiniBool     Boolean
41  HiLink dosiniNumber   Number
42  HiLink dosiniHeader   Special
43  HiLink dosiniComment  Comment
44  HiLink dosiniLabel    Type
45
46  delcommand HiLink
47endif
48
49let b:current_syntax = "dosini"
50
51" vim: sts=2 sw=2 et
52