about summary refs log tree commit diff stats
path: root/cpp/vimrc.vim
blob: 920e26a74f78532ce179f3f84fa5b1a9bc5d0ca1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
" Highlighting literate directives in C++ sources.
function! HighlightTangledFile()
  set ft=cpp
  syntax region tangleDirective start=+:(+ skip=+".*"+ end=+)+
  highlight link tangleDirective Delimiter
  syntax region traceContains start="^+" end="$"
  highlight traceContains ctermfg=darkgreen
  syntax region traceAbsent start="^-" end="$"
  highlight traceAbsent ctermfg=darkred
endfunction
call HighlightTangledFile()
autocmd BufRead,BufNewFile 0* call HighlightTangledFile()

set isk+=-

" scenarios inside c++ files
syntax match muComment /#.*$/ | highlight link muComment Comment
syntax keyword muControl reply jump jump-if jump-unless loop loop-if loop-unless break-if break-unless | highlight link muControl Identifier
syntax match muAssign "<-" | highlight link muAssign SpecialChar
syntax match muAssign "\<raw\>"