forked from chrisamaphone/interactive-lp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathceptre.vim
More file actions
73 lines (60 loc) · 3.25 KB
/
Copy pathceptre.vim
File metadata and controls
73 lines (60 loc) · 3.25 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
syn clear
" Just about anything in Ceptre is a keyword character
set iskeyword+=\",~,@,!,#-',*-45,47-57,59-90,94-122,\|,^:
colors default
" now, fix the defaults:
hi linenr cterm=NONE
hi Normal guifg=wheat guibg=grey10
hi StatusLine guibg=grey40 guifg=lavender gui=none
hi StatusLineNC guibg=grey25 guifg=black gui=none
hi SpecialKey guifg=grey27
hi NonText gui=none guifg=plum
hi IncSearch guibg=grey50 gui=none
hi Search guibg=cornflowerblue guifg=darkblue ctermfg=black ctermbg=3
hi ceptrePercentKeyFace term=NONE cterm=bold ctermfg=6 ctermbg=NONE gui=NONE guifg=#Aa88Ff guibg=NONE
hi ceptreTypeFace term=NONE cterm=NONE ctermfg=3 ctermbg=NONE gui=NONE guifg=#DdBbDd guibg=NONE
hi ceptreCommentFace term=NONE cterm=NONE ctermfg=6 ctermbg=NONE gui=NONE guifg=Grey50 guibg=NONE
hi ceptreSymbolFace term=NONE cterm=NONE ctermfg=Green ctermbg=NONE gui=NONE guifg=#DdBbDd guibg=NONE
hi visual guifg=NONE guibg=seagreen gui=none
hi ceptrePunctuationFace term=NONE cterm=NONE ctermfg=Green ctermbg=NONE gui=NONE guifg=#Dd77Dd guibg=NONE
hi ceptreDeclarationFace term=NONE cterm=bold ctermfg=7 ctermbg=NONE gui=NONE guifg=#DDF5AA guibg=NONE
hi ceptreFreeVariableFace term=NONE cterm=NONE ctermfg=5 ctermbg=NONE gui=NONE guifg=#99BbDd guibg=NONE
hi ceptreCurlyFace term=NONE cterm=NONE ctermfg=Green ctermbg=NONE gui=NONE guifg=#Dd6699 guibg=NONE
hi ceptreSquareFace term=NONE cterm=NONE ctermfg=Green ctermbg=NONE gui=NONE guifg=#Dd9966 guibg=NONE
syn keyword ceptrePercentKey #mode #interactive #trace #builtin
syn keyword ceptreType type pred bwd stage context
syn match ceptrePunct ":\|\.\|="
syn match ceptreFVar "\<[A-Z_]\k*\>"
syn keyword ceptreSymbol -> <- -o o- *
syn match ceptreDecl "^\s*[^()A-Z_]\k*\s*:" contains=ceptrePunct
syn match ceptreCurly "{\|}" contained
syn match ceptreSquare "\[\|\]" contained
syn match ceptreBindDecl "[^A-Z_{\[]\k*\s*:" contains=ceptrePunct contained
syn region ceptrePiBind start="{" end="}" keepend transparent contains=ceptreCurly,ceptrePunct,ceptreFVar,ceptreSymbol,ceptreType,ceptreBindDecl
syn region ceptreLamBind start="\[" end="\]" keepend transparent contains=ceptreSquare,ceptrePunct,ceptreFVar,ceptreSymbol,ceptreType,ceptreBindDecl
syn match ceptreParen "(\|)" contained
syn region ceptreParens start="(" end=")" transparent contains=ALL
" Comments hilighting
" single line, empty line comments
syn match ceptreComment "% .*\|%%.*\|%$"
" delimited comments, needs to contain itself to properly hilight nested
" comments
syn region ceptreDelimitedComment start="%{" end="}%" contains=ceptreDelimitedComment
" Assign coloration
hi link ceptreType ceptreTypeFace
hi link ceptrePercentKey ceptrePercentKeyFace
hi link ceptreComment ceptreCommentFace
hi link ceptreDelimitedComment ceptreCommentFace
hi link ceptreSymbol ceptreSymbolFace
hi link ceptrePunct ceptrePunctuationFace
hi link ceptreParen ceptreSymbolFace
hi link ceptreDecl ceptreDeclarationFace
hi link ceptreBindDecl ceptreDeclarationFace
hi link ceptreFVar ceptreFreeVariableFace
hi link ceptreCurly ceptreCurlyFace
hi link ceptreSquare ceptreSquareFace
" Indentation
set foldmethod=syntax
set foldminlines=3
" Set the current syntax name
let b:current_syntax = "ceptre"