blob: b1455034788a685c7ff3beae6ac99c4c30ec7605 [file] [log] [blame]
Bram Moolenaar822ff862014-06-12 21:46:14 +02001" 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
8if exists("b:current_syntax")
9 finish
10endif
11
12" Load Python syntax first (Python can be used within Kivy)
13syn include @pyth $VIMRUNTIME/syntax/python.vim
14
15" Kivy language rules can be found here
16" http://kivy.org/docs/guide/lang.html
17
18" Define Kivy syntax
19syn match kivyPreProc /#:.*/
20syn match kivyComment /#.*/
21syn match kivyRule /<\I\i*\(,\s*\I\i*\)*>:/
22syn match kivyAttribute /\<\I\i*\>/ nextgroup=kivyValue
23
24syn region kivyValue start=":" end=/$/ contains=@pyth skipwhite
25
26syn region kivyAttribute matchgroup=kivyIdent start=/[\a_][\a\d_]*:/ end=/$/ contains=@pyth skipwhite
27
28hi def link kivyPreproc PreProc
29hi def link kivyComment Comment
30hi def link kivyRule Function
31hi def link kivyIdent Statement
32hi def link kivyAttribute Label
33
34let b:current_syntax = "kivy"
35
36" vim: ts=8