about summary refs log blame commit diff stats
path: root/cpp/vimrc.vim
blob: 6dd7f18eaf4e06dcf19f362fadedcf1efd163b8a (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
                                                  



                                





                                                              


                                                             
 
          
" Highlighting literate directives in C++ sources.
function! HighlightTangledFile()
  if &ft == ""
    set ft=cpp
  endif
  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 BufReadPost,BufNewFile 0* call HighlightTangledFile()

set isk+=-