kivy.vim 986 B

12345678910111213141516171819202122232425262728293031323334353637
  1. " Vim syntax file
  2. " Language: Kivy
  3. " Maintainer: Corey Prophitt <prophitt.corey@gmail.com>
  4. " Last Change: May 29th, 2014
  5. " Version: 1
  6. " URL: http://kivy.org/
  7. if exists("b:current_syntax")
  8. finish
  9. endif
  10. " Load Python syntax first (Python can be used within Kivy)
  11. syn include @pyth $VIMRUNTIME/syntax/python.vim
  12. " Kivy language rules can be found here
  13. " http://kivy.org/docs/guide/lang.html
  14. " Define Kivy syntax
  15. syn match kivyPreProc /#:.*/
  16. syn match kivyComment /#.*/
  17. syn match kivyRule /<\I\i*\(,\s*\I\i*\)*>:/
  18. syn match kivyAttribute /\<\I\i*\>/ nextgroup=kivyValue
  19. syn region kivyValue start=":" end=/$/ contains=@pyth skipwhite
  20. syn region kivyAttribute matchgroup=kivyIdent start=/[\a_][\a\d_]*:/ end=/$/ contains=@pyth skipwhite
  21. hi def link kivyPreproc PreProc
  22. hi def link kivyComment Comment
  23. hi def link kivyRule Function
  24. hi def link kivyIdent Statement
  25. hi def link kivyAttribute Label
  26. let b:current_syntax = "kivy"
  27. " vim: ts=8