vim-logrotate/syntax/logrotate.vim

31 lines
1.3 KiB
VimL

" Vim syntax file
" Language: logrotate
if exists("b:current_syntax")
finish
endif
syntax include @logRotateSh syntax/sh.vim
unlet b:current_syntax
syntax region logRotateScript matchgroup=logRotateKeyword start="\s*\<\%(firstaction\|lastaction\|prerotate\|postrotate\|preremove\)\>" end="\<endscript\>" contains=@logRotateSh
" for comments, todo, string
runtime! syntax/conf.vim
syntax keyword logRotateKeyword addextension allowhardlink compress compresscmd
\ compressext compressoptions copy copytruncate create createolddir
\ daily dateext dateformat datehourago dateyesterday delaycompress
\ endscript extension firstaction hourly ifempty include lastaction
\ mail mailfirst maillast maxage maxsize minage minsize missingok
\ monthly noallowhardlink nocompress nocopy nocopytruncate nocreate
\ nocreateolddir nodateext nodelaycompress nomail nomissingok
\ noolddir norenamecopy nosharedscripts noshred notifempty olddir
\ postrotate preremove prerotate renamecopy rotate sharedscripts
\ shred shredcycles size start su tabooext taboopat uncompresscmd
\ weekly yearly
highlight default link logRotateKeyword Keyword
let b:current_syntax = 'logrotate'