dosini.vim 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. " Vim syntax file
  2. " Language: Configuration File (ini file) for MSDOS/MS Windows
  3. " Version: 2.2
  4. " Original Author: Sean M. McKee <mckee@misslink.net>
  5. " Previous Maintainer: Nima Talebi <nima@it.net.au>
  6. " Current Maintainer: Hong Xu <hong@topbug.net>
  7. " Homepage: http://www.vim.org/scripts/script.php?script_id=3747
  8. " Repository: https://github.com/xuhdev/syntax-dosini.vim
  9. " Last Change: 2018 Sep 11
  10. " quit when a syntax file was already loaded
  11. if exists("b:current_syntax")
  12. finish
  13. endif
  14. " shut case off
  15. syn case ignore
  16. syn match dosiniLabel "^.\{-}\ze\s*=" nextgroup=dosiniNumber,dosiniValue
  17. syn match dosiniValue "=\zs.*"
  18. syn match dosiniNumber "=\zs\s*\d\+\s*$"
  19. syn match dosiniNumber "=\zs\s*\d*\.\d\+\s*$"
  20. syn match dosiniNumber "=\zs\s*\d\+e[+-]\=\d\+\s*$"
  21. syn region dosiniHeader start="^\s*\[" end="\]"
  22. syn match dosiniComment "^[#;].*$"
  23. " Define the default highlighting.
  24. " Only when an item doesn't have highlighting yet
  25. hi def link dosiniNumber Number
  26. hi def link dosiniHeader Special
  27. hi def link dosiniComment Comment
  28. hi def link dosiniLabel Type
  29. hi def link dosiniValue String
  30. let b:current_syntax = "dosini"
  31. " vim: sts=2 sw=2 et