embed script has syntax highlight

This commit is contained in:
2022-10-27 12:52:47 -04:00
parent 4849640ef1
commit 9eb422ba89
2 changed files with 10 additions and 11 deletions

View File

@ -6,11 +6,10 @@ if exists("b:current_syntax")
finish
endif
syn region logRotateScript matchgroup=logRotateKeyword start="\s*\<firstaction\>" end="\<endscript\>" contains=NONE
syn region logRotateScript matchgroup=logRotateKeyword start="\s*\<lastaction\>" end="\<endscript\>" contains=NONE
syn region logRotateScript matchgroup=logRotateKeyword start="\s*\<prerotate\>" end="\<endscript\>" contains=NONE
syn region logRotateScript matchgroup=logRotateKeyword start="\s*\<postrotate\>" end="\<endscript\>" contains=NONE
syn region logRotateScript matchgroup=logRotateKeyword start="\s*\<preremove\>" end="\<endscript\>" contains=NONE
syn include @logRotateSh syntax/sh.vim
unlet b:current_syntax
syn region logRotateScript matchgroup=logRotateKeyword start="\s*\<\%(firstaction\|lastaction\|prerotate\|postrotate\|preremove\)\>" end="\<endscript\>" contains=@logRotateSh
runtime! syntax/conf.vim
@ -40,6 +39,6 @@ hi def link logRotateKeyword Keyword
" hi def link logRotateComment Comment
" hi def link logRotateTodo Todo
hi def link logRotateScript Function
" hi def link logRotateScript Function
let b:current_syntax = 'logrotate'