1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
" Vim syntax file
" Language: Enaml
" Maintainer: Robert Kern <rkern@enthought.com>
" URL: http://github.com/nucleic/enaml
" Last Change: 2012 February 16
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
" Read the Python syntax to start with
if version < 600
so <sfile>:p:h/python.vim
else
runtime! syntax/python.vim
unlet b:current_syntax
endif
" Enaml extensions
syn keyword enamlStatement enamldef attr func alias
" FIXME: This captures the predefined operators, not any extensions that may be
" added.
syn match enamlOperator "\%(\w\|\s\)\zs\(::\|<<\|>>\|=\|:=\)\ze\%(\w\|\s\|$\)"
if exists("python_highlight_builtins") || exists("enaml_highlight_builtins")
syn keyword enamlBuiltin horizontal vertical hbox vbox align spacer
endif
" Default highlighting
if version >= 508 || !exists("did_enaml_syntax_inits")
if version < 508
let did_enaml_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink enamlStatement Statement
HiLink enamlOperator Operator
if exists("python_highlight_builtins") || exists("enaml_highlight_builtins")
HiLink enamlBuiltin Function
endif
delcommand HiLink
endif
let b:current_syntax = "enaml"
|