annotate runtime/syntax/kivy.vim @ 6999:dc1b678f0e4e v7.4.817

patch 7.4.817 Problem: Invalid memory access in file_pat_to_reg_pat(). Solution: Use vim_isspace() instead of checking for a space only. (Dominique Pelle)
author Bram Moolenaar <bram@vim.org>
date Tue, 11 Aug 2015 16:20:05 +0200
parents 92751673cc37
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5968
92751673cc37 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
1 " Vim syntax file
92751673cc37 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2 " Language: Kivy
92751673cc37 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 " Maintainer: Corey Prophitt <prophitt.corey@gmail.com>
92751673cc37 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
4 " Last Change: May 29th, 2014
92751673cc37 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
5 " Version: 1
92751673cc37 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
6 " URL: http://kivy.org/
92751673cc37 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7
92751673cc37 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8 if exists("b:current_syntax")
92751673cc37 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9 finish
92751673cc37 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10 endif
92751673cc37 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11
92751673cc37 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12 " Load Python syntax first (Python can be used within Kivy)
92751673cc37 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 syn include @pyth $VIMRUNTIME/syntax/python.vim
92751673cc37 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14
92751673cc37 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 " Kivy language rules can be found here
92751673cc37 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
16 " http://kivy.org/docs/guide/lang.html
92751673cc37 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17
92751673cc37 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18 " Define Kivy syntax
92751673cc37 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19 syn match kivyPreProc /#:.*/
92751673cc37 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20 syn match kivyComment /#.*/
92751673cc37 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 syn match kivyRule /<\I\i*\(,\s*\I\i*\)*>:/
92751673cc37 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 syn match kivyAttribute /\<\I\i*\>/ nextgroup=kivyValue
92751673cc37 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23
92751673cc37 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 syn region kivyValue start=":" end=/$/ contains=@pyth skipwhite
92751673cc37 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25
92751673cc37 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26 syn region kivyAttribute matchgroup=kivyIdent start=/[\a_][\a\d_]*:/ end=/$/ contains=@pyth skipwhite
92751673cc37 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27
92751673cc37 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 hi def link kivyPreproc PreProc
92751673cc37 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29 hi def link kivyComment Comment
92751673cc37 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 hi def link kivyRule Function
92751673cc37 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31 hi def link kivyIdent Statement
92751673cc37 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32 hi def link kivyAttribute Label
92751673cc37 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33
92751673cc37 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34 let b:current_syntax = "kivy"
92751673cc37 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35
92751673cc37 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
36 " vim: ts=8