dosini.vim (1553B)
1 " Vim syntax file 2 " Language: Configuration File (ini file) for MSDOS/MS Windows 3 " Version: 2.4 4 " Original Author: Sean M. McKee <mckee@misslink.net> 5 " Previous Maintainer: Nima Talebi <nima@it.net.au> 6 " Current Maintainer: Hong Xu <hong@topbug.net> 7 " Homepage: http://www.vim.org/scripts/script.php?script_id=3747 8 " Repository: https://github.com/xuhdev/syntax-dosini.vim 9 " Last Change: 2024 Sept 08 10 11 12 " quit when a syntax file was already loaded 13 if exists("b:current_syntax") 14 finish 15 endif 16 17 " using of line-continuation requires cpo&vim 18 let s:cpo_save = &cpo 19 set cpo&vim 20 21 " shut case off 22 syn case ignore 23 24 syn match dosiniLabel "^.\{-}\ze\s*=" nextgroup=dosiniNumber,dosiniValue 25 syn match dosiniValue "=\zs.*" 26 syn match dosiniNumber "=\zs\s*\d\+\s*$" 27 syn match dosiniNumber "=\zs\s*\d*\.\d\+\s*$" 28 syn match dosiniNumber "=\zs\s*\d\+e[+-]\=\d\+\s*$" 29 syn region dosiniHeader start="^\s*\[" end="\]" 30 syn match dosiniComment "^[#;].*$" contains=@Spell 31 syn region dosiniSection start="\s*\[.*\]" end="\ze\s*\[.*\]" fold 32 \ contains=dosiniLabel,dosiniValue,dosiniNumber,dosiniHeader,dosiniComment 33 34 " Define the default highlighting. 35 " Only when an item doesn't have highlighting yet 36 37 hi def link dosiniNumber Number 38 hi def link dosiniHeader Special 39 hi def link dosiniComment Comment 40 hi def link dosiniLabel Type 41 hi def link dosiniValue String 42 43 44 let b:current_syntax = "dosini" 45 46 let &cpo = s:cpo_save 47 unlet s:cpo_save 48 49 " vim: sts=2 sw=2 et