xref: /vim-8.2.3635/runtime/syntax/dosini.vim (revision 95bafa29)
1" Vim syntax file
2" Language:               Configuration File (ini file) for MSDOS/MS Windows
3" Version:                2.2
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" Repository:             https://github.com/xuhdev/syntax-dosini.vim
9" Last Change:            2018 Sep 11
10
11
12" quit when a syntax file was already loaded
13if exists("b:current_syntax")
14  finish
15endif
16
17" shut case off
18syn case ignore
19
20syn match  dosiniLabel    "^.\{-}\ze\s*=" nextgroup=dosiniNumber,dosiniValue
21syn match  dosiniValue    "=\zs.*"
22syn match  dosiniNumber   "=\zs\s*\d\+\s*$"
23syn match  dosiniNumber   "=\zs\s*\d*\.\d\+\s*$"
24syn match  dosiniNumber   "=\zs\s*\d\+e[+-]\=\d\+\s*$"
25syn region dosiniHeader   start="^\s*\[" end="\]"
26syn match  dosiniComment  "^[#;].*$"
27
28" Define the default highlighting.
29" Only when an item doesn't have highlighting yet
30
31hi def link dosiniNumber   Number
32hi def link dosiniHeader   Special
33hi def link dosiniComment  Comment
34hi def link dosiniLabel    Type
35hi def link dosiniValue    String
36
37
38let b:current_syntax = "dosini"
39
40" vim: sts=2 sw=2 et
41