-
Notifications
You must be signed in to change notification settings - Fork 0
/
specrb.vim
51 lines (41 loc) · 1.58 KB
/
specrb.vim
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
51
" Vim syntax file
" Language: spec.rb
" Maintainer: Michal Jirku <box@wejn.org>
" Last Change: 2013-02-09
"
" Work in progress...
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
syn match specrbTitle "^!\s*.*"
syn match specrbComment "^#.*"
syn match specrbSection "^=\+\s.*"
syn keyword specrbKeywords XXX TODO FIXME
syn match specrbList "^\*"
syn match specrbDefListStart "^:" nextgroup=specrbDefListTerm skipwhite
syn match specrbDefListTerm "[^=]*" nextgroup=specrbDefListSep contained skipwhite contains=specrbPre,specrbHilite,specrbKeywords,specrbBR
syn match specrbDefListSep "=" nextgroup=specrbDefListDef contained skipwhite
syn match specrbDefListDef ".*" contained skipwhite contains=specrbPre,specrbHilite,specrbKeywords,specrbBR
syn region specrbCodeBlock start="^{{{" end="^}}}" fold
syn match specrbPre "`[^`]*`"
syn match specrbHilite "\^[^^]\+\^"
syn match specrbLink "<[^>]*>"
syn match specrbBR ";;"
syn region specrbTable start="^|" end="$" contains=specrbTableSep,specrbPre,specrbHilite,specrbKeywords,specrbBR
syn match specrbTableSep "|" contained
hi def link specrbTitle Type
hi def link specrbComment Comment
hi def link specrbSection Function
hi def link specrbKeywords Todo
hi specrbBR ctermfg=5
hi def link specrbCodeBlock Constant
hi def link specrbDefListStart PreProc
hi def link specrbDefListSep PreProc
hi def link specrbList PreProc
hi def link specrbPre Constant
hi specrbHilite term=reverse cterm=reverse ctermfg=3 guibg=DarkMagenta
hi def link specrbLink Statement
hi def link specrbTableSep Underlined
let b:current_syntax = "specrb"