espeaklist.vim 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. " Vim syntax file
  2. " Language: eSpeak Dictionary List Files
  3. " Filenames: *_list, *_listx, *_extra, *_emoji
  4. " Maintainer: Reece H. Dunn <msclrhd@gmail.com>
  5. " Last Change: 2017 Jun 3
  6. " Quit when a (custom) syntax file was already loaded
  7. if exists("b:current_syntax")
  8. finish
  9. endif
  10. syn region espeaklistLineComment start="^//" end="$" keepend contains=espeaklistComment
  11. syn match espeaklistLinePhraseEntry "^\(\(//\)\@!\)(.*$" contains=espeaklistEntryPhrase
  12. syn match espeaklistLineEntry "^\(\(//\)\@!\)[^?(].*$" contains=espeaklistEntryWord
  13. syn match espeaklistLineConditionalEntry "^[?!].*$" contains=espeaklistEntryConditional
  14. syn match espeaklistLineFlagEntry "^\$.*$" contains=espeaklistFlag
  15. syn region espeaklistComment contained start="//" end="$" keepend contains=@Spell
  16. syn region espeaklistFlag contained start="\$" end="[ \t\r\n]" skipwhite nextgroup=espeaklistFlag,espeaklistComment
  17. syn region espeaklistEntryConditional contained start="^[?!]" end="[ \t]" skipwhite nextgroup=espeaklistEntryPhrase,espeaklistEntryWord
  18. syn region espeaklistEntryPhrase contained start="^(" end=")" skipwhite nextgroup=espeaklistEntryPronunciation
  19. syn match espeaklistEntryWord contained "[^ \t\r\n]\+" skipwhite nextgroup=espeaklistEntryPronunciation,espeaklistFlag
  20. syn match espeaklistEntryPronunciation contained "[^$/]*" skipwhite nextgroup=espeaklistFlag,espeaklistComment
  21. " Define the default highlighting.
  22. " Only used when an item doesn't have highlighting yet
  23. hi def link espeaklistComment Comment
  24. hi def link espeaklistFlag PreProc
  25. hi def link espeaklistEntryConditional PreProc
  26. hi def link espeaklistEntryPhrase espeaklistEntry
  27. hi def link espeaklistEntryWord espeaklistEntry
  28. hi def link espeaklistEntryPronunciation None
  29. hi def link espeaklistEntry Identifier
  30. let b:current_syntax = "espeaklist"
  31. " vim: ts=8