From 38f0b91af27a14e3673f531f63faa9ea1c1f07c1 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 10 Apr 2015 23:59:59 -0700 Subject: 1048 --- cpp/vimrc.vim | 21 +++++++-------------- mu.vim | 10 +++++----- 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/cpp/vimrc.vim b/cpp/vimrc.vim index 9d347ba6..6dd7f18e 100644 --- a/cpp/vimrc.vim +++ b/cpp/vimrc.vim @@ -1,23 +1,16 @@ -" Highlighting wart's literate directives in C++ sources. +" Highlighting literate directives in C++ sources. function! HighlightTangledFile() if &ft == "" set ft=cpp endif - syntax region wartTangle start=+:(+ skip=+".*"+ end=+)+ - highlight link wartTangle Delimiter - syntax region wartTrace start="^+" end="$" - highlight wartTrace ctermfg=darkgreen - syntax region wartTraceAbsent start="^-" end="$" - highlight wartTraceAbsent ctermfg=darkred - syntax region wartTraceResult start="^=>" end="$" - highlight wartTraceResult ctermfg=darkgreen cterm=bold - syntax region wartComment start="# " end="$" - highlight link wartComment Comment + 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+=- -syntax keyword muControl next-ingredient 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 "\" diff --git a/mu.vim b/mu.vim index ea1bcb42..63ee7bc0 100644 --- a/mu.vim +++ b/mu.vim @@ -20,10 +20,8 @@ set cpo&vim setlocal iskeyword=@,48-57,?,!,_,$,- -syntax match muComment /#.*$/ -highlight link muComment Comment -syntax match muSalientComment /##.*$/ -highlight link muSalientComment SalientComment +syntax match muComment /#.*$/ | highlight link muComment Comment +syntax match muSalientComment /##.*$/ | highlight link muSalientComment SalientComment set comments+=n:# syntax match CommentedCode "#? .*" let b:cmt_head = "#? " @@ -34,6 +32,8 @@ highlight link muString String syntax match muDelimiter "[{}\[\]]" | highlight link muDelimiter Delimiter syntax match muAssign "<-" | highlight link muAssign SpecialChar syntax match muAssign "\" -syntax keyword muFunc next-input input reply jump jump-if jump-unless loop loop-if loop-unless break-if break-unless | highlight link muFunc Function +syntax keyword muControl reply jump jump-if jump-unless loop loop-if loop-unless break-if break-unless | highlight link muControl Function +" common keywords +syntax keyword muFunc recipe default-space next-ingredient ingredient before after scenario run memory trace screen keyboard stalled finished | highlight link muFunc Statement let &cpo = s:save_cpo -- cgit 1.4.1-2-gfad0