2014-07-10 21:05:51 -07:00
|
|
|
" Vim syntax file
|
|
|
|
" Language: Configuration File (ini file) for MSDOS/MS Windows
|
2024-09-11 00:22:45 -07:00
|
|
|
" Version: 2.4
|
2014-07-10 21:05:51 -07:00
|
|
|
" Original Author: Sean M. McKee <mckee@misslink.net>
|
|
|
|
" Previous Maintainer: Nima Talebi <nima@it.net.au>
|
2018-10-29 15:58:13 -07:00
|
|
|
" Current Maintainer: Hong Xu <hong@topbug.net>
|
2014-07-10 21:05:51 -07:00
|
|
|
" Homepage: http://www.vim.org/scripts/script.php?script_id=3747
|
2018-10-29 15:58:13 -07:00
|
|
|
" Repository: https://github.com/xuhdev/syntax-dosini.vim
|
2024-09-11 00:22:45 -07:00
|
|
|
" Last Change: 2024 Sept 08
|
2014-07-10 21:05:51 -07:00
|
|
|
|
|
|
|
|
2017-04-28 12:06:44 -07:00
|
|
|
" quit when a syntax file was already loaded
|
|
|
|
if exists("b:current_syntax")
|
2014-07-10 21:05:51 -07:00
|
|
|
finish
|
|
|
|
endif
|
|
|
|
|
2023-08-21 04:58:13 -07:00
|
|
|
" using of line-continuation requires cpo&vim
|
|
|
|
let s:cpo_save = &cpo
|
|
|
|
set cpo&vim
|
|
|
|
|
2014-07-10 21:05:51 -07:00
|
|
|
" shut case off
|
|
|
|
syn case ignore
|
|
|
|
|
2018-10-29 15:58:13 -07:00
|
|
|
syn match dosiniLabel "^.\{-}\ze\s*=" nextgroup=dosiniNumber,dosiniValue
|
|
|
|
syn match dosiniValue "=\zs.*"
|
|
|
|
syn match dosiniNumber "=\zs\s*\d\+\s*$"
|
|
|
|
syn match dosiniNumber "=\zs\s*\d*\.\d\+\s*$"
|
|
|
|
syn match dosiniNumber "=\zs\s*\d\+e[+-]\=\d\+\s*$"
|
2014-07-10 21:05:51 -07:00
|
|
|
syn region dosiniHeader start="^\s*\[" end="\]"
|
2024-09-11 00:22:45 -07:00
|
|
|
syn match dosiniComment "^[#;].*$" contains=@Spell
|
2023-08-11 10:54:22 -07:00
|
|
|
syn region dosiniSection start="\s*\[.*\]" end="\ze\s*\[.*\]" fold
|
|
|
|
\ contains=dosiniLabel,dosiniValue,dosiniNumber,dosiniHeader,dosiniComment
|
2014-07-10 21:05:51 -07:00
|
|
|
|
|
|
|
" Define the default highlighting.
|
2017-04-28 12:06:44 -07:00
|
|
|
" Only when an item doesn't have highlighting yet
|
|
|
|
|
2017-04-28 12:14:34 -07:00
|
|
|
hi def link dosiniNumber Number
|
|
|
|
hi def link dosiniHeader Special
|
|
|
|
hi def link dosiniComment Comment
|
|
|
|
hi def link dosiniLabel Type
|
2018-10-29 15:58:13 -07:00
|
|
|
hi def link dosiniValue String
|
2017-04-28 12:06:44 -07:00
|
|
|
|
2014-07-10 21:05:51 -07:00
|
|
|
|
|
|
|
let b:current_syntax = "dosini"
|
|
|
|
|
2023-08-21 04:58:13 -07:00
|
|
|
let &cpo = s:cpo_save
|
|
|
|
unlet s:cpo_save
|
|
|
|
|
2014-07-10 21:05:51 -07:00
|
|
|
" vim: sts=2 sw=2 et
|