2004-06-13 20:20:40 +00:00
|
|
|
" Vim syntax file
|
2011-09-14 17:55:08 +02:00
|
|
|
" Language: Configuration File (ini file) for MSDOS/MS Windows
|
2024-09-10 20:52:15 +02:00
|
|
|
" Version: 2.4
|
2011-09-14 17:55:08 +02:00
|
|
|
" Original Author: Sean M. McKee <mckee@misslink.net>
|
|
|
|
" Previous Maintainer: Nima Talebi <nima@it.net.au>
|
2018-10-02 13:26:25 +02:00
|
|
|
" Current Maintainer: Hong Xu <hong@topbug.net>
|
2011-12-14 21:17:39 +01:00
|
|
|
" Homepage: http://www.vim.org/scripts/script.php?script_id=3747
|
2018-10-02 13:26:25 +02:00
|
|
|
" Repository: https://github.com/xuhdev/syntax-dosini.vim
|
2024-09-10 20:52:15 +02:00
|
|
|
" Last Change: 2024 Sept 08
|
2007-05-05 18:24:42 +00:00
|
|
|
|
2004-06-13 20:20:40 +00:00
|
|
|
|
2016-08-30 23:26:57 +02:00
|
|
|
" quit when a syntax file was already loaded
|
|
|
|
if exists("b:current_syntax")
|
2004-06-13 20:20:40 +00:00
|
|
|
finish
|
|
|
|
endif
|
|
|
|
|
2023-08-21 06:49:38 +02:00
|
|
|
" using of line-continuation requires cpo&vim
|
|
|
|
let s:cpo_save = &cpo
|
|
|
|
set cpo&vim
|
|
|
|
|
2004-06-13 20:20:40 +00:00
|
|
|
" shut case off
|
|
|
|
syn case ignore
|
|
|
|
|
2018-10-02 13:26:25 +02: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*$"
|
2011-09-14 17:55:08 +02:00
|
|
|
syn region dosiniHeader start="^\s*\[" end="\]"
|
2024-09-10 20:52:15 +02:00
|
|
|
syn match dosiniComment "^[#;].*$" contains=@Spell
|
2023-08-11 10:29:20 -07:00
|
|
|
syn region dosiniSection start="\s*\[.*\]" end="\ze\s*\[.*\]" fold
|
|
|
|
\ contains=dosiniLabel,dosiniValue,dosiniNumber,dosiniHeader,dosiniComment
|
2004-06-13 20:20:40 +00:00
|
|
|
|
|
|
|
" Define the default highlighting.
|
2016-08-30 23:26:57 +02:00
|
|
|
" Only when an item doesn't have highlighting yet
|
|
|
|
|
2016-08-31 22:22:10 +02:00
|
|
|
hi def link dosiniNumber Number
|
|
|
|
hi def link dosiniHeader Special
|
|
|
|
hi def link dosiniComment Comment
|
|
|
|
hi def link dosiniLabel Type
|
2018-10-02 13:26:25 +02:00
|
|
|
hi def link dosiniValue String
|
2016-08-30 23:26:57 +02:00
|
|
|
|
2004-06-13 20:20:40 +00:00
|
|
|
|
|
|
|
let b:current_syntax = "dosini"
|
|
|
|
|
2023-08-21 06:49:38 +02:00
|
|
|
let &cpo = s:cpo_save
|
|
|
|
unlet s:cpo_save
|
|
|
|
|
2011-09-14 17:55:08 +02:00
|
|
|
" vim: sts=2 sw=2 et
|