xref: /vim-8.2.3635/runtime/syntax/dosini.vim (revision cb03397a)
1" Vim syntax file
2" Language:               Configuration File (ini file) for MSDOS/MS Windows
3" Version:                2.1
4" Original Author:        Sean M. McKee <[email protected]>
5" Previous Maintainer:    Nima Talebi <[email protected]>
6" Current Maintainer:     Hong Xu <[email protected]>
7" Homepage:               http://www.vim.org/scripts/script.php?script_id=3747
8"                         https://bitbucket.org/xuhdev/syntax-dosini.vim
9" Last Change:            2011 Nov 8
10
11
12" For version 5.x: Clear all syntax items
13" For version 6.x: Quit when a syntax file was already loaded
14if version < 600
15  syntax clear
16elseif exists("b:current_syntax")
17  finish
18endif
19
20" shut case off
21syn case ignore
22
23syn match  dosiniNumber   "\<\d\+\>"
24syn match  dosiniNumber   "\<\d*\.\d\+\>"
25syn match  dosiniNumber   "\<\d\+e[+-]\=\d\+\>"
26syn match  dosiniLabel    "^.\{-}="
27syn region dosiniHeader   start="^\s*\[" end="\]"
28syn match  dosiniComment  "^[#;].*$"
29
30" Define the default highlighting.
31" For version 5.7 and earlier: only when not done already
32" For version 5.8 and later: only when an item doesn't have highlighting yet
33if version >= 508 || !exists("did_dosini_syntax_inits")
34  if version < 508
35    let did_dosini_syntax_inits = 1
36    command -nargs=+ HiLink hi link <args>
37  else
38    command -nargs=+ HiLink hi def link <args>
39  endif
40
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