Skip to content

Commit bb15291

Browse files
author
Cyril David
committed
Add initial mote syntax file.
1 parent 443f2ab commit bb15291

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed

extras/mote.vim

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
" Vim syntax file
2+
" Language: mote
3+
" Maintainer: Armin Ronacher <[email protected]>
4+
" URL: http://lucumr.pocoo.org/
5+
" Last Change: 2008 September 12
6+
" Version: 0.6.1
7+
"
8+
" For version 5.x: Clear all syntax items
9+
" For version 6.x: Quit when a syntax file was already loaded
10+
if !exists("main_syntax")
11+
let main_syntax = 'html'
12+
endif
13+
14+
if version < 600
15+
syntax clear
16+
elseif exists("b:current_syntax")
17+
finish
18+
endif
19+
20+
if !exists("main_syntax")
21+
let main_syntax = "html"
22+
endif
23+
24+
" Source the html syntax file
25+
ru! syntax/html.vim
26+
unlet b:current_syntax
27+
28+
" Put the ruby syntax file in @rubyTop
29+
syn include @rubyTop syntax/ruby.vim
30+
31+
" End keywords
32+
syn keyword moteEnd contained else elsif end
33+
34+
" Block rules
35+
syn region moteLine matchgroup=moteDelim start="^\s*%" end="$" keepend contains=@rubyTop,moteEnd
36+
37+
" Variables
38+
syn region moteVariable matchgroup=moteDelim start="\${" end="}" contains=@rubyTop
39+
40+
" Newline Escapes
41+
syn match moteEscape /\\$/
42+
43+
" Default highlighting links
44+
if version >= 508 || !exists("did_mote_syn_inits")
45+
if version < 508
46+
let did_mote_syn_inits = 1
47+
com -nargs=+ HiLink hi link <args>
48+
else
49+
com -nargs=+ HiLink hi def link <args>
50+
endif
51+
52+
HiLink moteDocComment moteComment
53+
HiLink moteDefEnd moteDelim
54+
55+
HiLink moteAttributeKey Type
56+
HiLink moteAttributeValue String
57+
HiLink moteText Normal
58+
HiLink moteDelim Preproc
59+
HiLink moteEnd Keyword
60+
HiLink moteComment Comment
61+
HiLink moteEscape Special
62+
HiLink moteVariable Special
63+
64+
delc HiLink
65+
endif
66+
67+
let b:current_syntax = "eruby"

0 commit comments

Comments
 (0)