about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-04-10 23:59:59 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-04-11 12:12:31 -0700
commit38f0b91af27a14e3673f531f63faa9ea1c1f07c1 (patch)
treed60bb14ec4bdeded5300cefc661b63468e73e87f
parentd472e0dd3a10787632f0b0ad35bf086b5d81ac9d (diff)
downloadmu-38f0b91af27a14e3673f531f63faa9ea1c1f07c1.tar.gz
1048
-rw-r--r--cpp/vimrc.vim21
-rw-r--r--mu.vim10
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 "\<raw\>"
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 "\<raw\>"
-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