From 3e1349d29fa00db1fab3a811b60bc9d8de0355e4 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 30 Sep 2016 10:45:14 -0700 Subject: 3431 Improvements to syntax highlighting, particularly for Mu code in C++ files. --- vimrc.vim | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'vimrc.vim') diff --git a/vimrc.vim b/vimrc.vim index a3f31d1e..32c96159 100644 --- a/vimrc.vim +++ b/vimrc.vim @@ -24,7 +24,19 @@ function! HighlightTangledFile() syntax match muCommentedCode /#? .*$/ | highlight link muCommentedCode CommentedCode set comments+=n:# " Some other bare-bones mu highlighting. + syntax match muLiteral %[^ ]\+:literal/[^ ,]*\|[^ ]\+:literal\>% + syntax match muLiteral %[^ ]\+:label/[^ ,]*\|[^ ]\+:label\>% + syntax match muLiteral %[^ ]\+:type/[^ ,]*\|[^ ]\+:type\>% + syntax match muLiteral %[^ ]\+:offset/[^ ,]*\|[^ ]\+:offset\>% + syntax match muLiteral %[^ ]\+:variant/[^ ,]*\|[^ ]\+:variant\>% + highlight link muLiteral Constant syntax match muAssign " <- \|\" | highlight link muAssign SpecialChar + syntax match muGlobal %[^ ]\+:global/[^ ,]*\|[^ ]\+:global\>% | highlight link muGlobal SpecialChar + " common keywords + syntax match muRecipe "^recipe\>\|^recipe!\>\|^def\>\|^def!\>\|^before\>\|^after\>\| -> " | highlight muRecipe ctermfg=208 + syntax match muScenario "^scenario\>" | highlight muScenario ctermfg=34 + syntax match muPendingScenario "^pending-scenario\>" | highlight link muPendingScenario SpecialChar + syntax match muData "^type\>\|^container\>\|^exclusive-container\>" | highlight muData ctermfg=226 endfunction call HighlightTangledFile() autocmd BufRead,BufNewFile *.mu set ft=mu -- cgit 1.4.1-2-gfad0