2014-07-10 21:05:51 -07:00
|
|
|
" Vim syntax file
|
|
|
|
" Language: Configuration File (ini file) for MSDOS/MS Windows
|
2018-10-29 15:58:13 -07:00
|
|
|
" Version: 2.2
|
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
|
|
|
|
" Last Change: 2018 Sep 11
|
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
|
|
|
|
|
|
|
|
" 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="\]"
|
|
|
|
syn match dosiniComment "^[#;].*$"
|
|
|
|
|
|
|
|
" 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"
|
|
|
|
|
|
|
|
" vim: sts=2 sw=2 et
|