~gpanders/dotfiles

f496d35d29a0eca00d03865ff933b12bcb088ec0 — Greg Anders 1 year, 3 months ago e00c9e7
Add awkembed.vim syntax highlighting

Syntax highlights AWK scripts inside shell files
1 files changed, 14 insertions(+), 0 deletions(-)

A vim/.vim/after/syntax/sh/awkembed.vim
A vim/.vim/after/syntax/sh/awkembed.vim => vim/.vim/after/syntax/sh/awkembed.vim +14 -0
@@ 0,0 1,14 @@
" AWK Embedding:
" ==============
" Shamelessly ripped from aspperl.vim by Aaron Hope.
"
" See :h sh-awk
if exists('b:current_syntax')
    unlet b:current_syntax
endif

syn include @AWKScript syntax/awk.vim
syn region AWKScriptCode matchgroup=AWKCommand start=+[=\\]\@<!'+ skip=+\\'+ end=+'+ contains=@AWKScript contained
syn region AWKScriptEmbedded matchgroup=AWKCommand start=+\<awk\>+ skip=+\\$+ end=+[=\\]\@<!'+me=e-1 contains=@shIdList,@shExprList2 nextgroup=AWKScriptCode
syn cluster shCommandSubList add=AWKScriptEmbedded
hi def link AWKCommand Type