0
0
mirror of https://github.com/vim/vim.git synced 2025-07-04 23:07:33 -04:00
vim/runtime/syntax/dosini.vim

43 lines
1.4 KiB
VimL
Raw Normal View History

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
" Version: 2.3
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
" Last Change: 2023 Jun 27
2007-05-05 18:24:42 +00:00
2004-06-13 20:20:40 +00:00
" quit when a syntax file was already loaded
if exists("b:current_syntax")
2004-06-13 20:20:40 +00:00
finish
endif
" 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="\]"
syn match dosiniComment "^[#;].*$"
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.
" Only when an item doesn't have highlighting yet
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
2004-06-13 20:20:40 +00:00
let b:current_syntax = "dosini"
2011-09-14 17:55:08 +02:00
" vim: sts=2 sw=2 et