1
0
Fork 0
mirror of https://github.com/vim/vim synced 2025-03-21 17:25:11 +01:00
vim/runtime/syntax/dosini.vim

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
1.5 KiB
VimL
Raw Permalink 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.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
" Last Change: 2024 Sept 08
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
" 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="\]"
syn match dosiniComment "^[#;].*$" contains=@Spell
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"
let &cpo = s:cpo_save
unlet s:cpo_save
2011-09-14 17:55:08 +02:00
" vim: sts=2 sw=2 et