2022-10-26 21:57:54 -04:00
|
|
|
" Vim syntax file
|
|
|
|
" Language: logrotate
|
|
|
|
|
|
|
|
if exists("b:current_syntax")
|
|
|
|
finish
|
|
|
|
endif
|
|
|
|
|
2022-10-27 13:53:24 -04:00
|
|
|
syntax include @logRotateSh syntax/sh.vim
|
2022-10-27 12:52:47 -04:00
|
|
|
unlet b:current_syntax
|
|
|
|
|
2022-10-27 17:07:37 -04:00
|
|
|
" FIXME:
|
|
|
|
" Whitespace is not required in actual config,
|
|
|
|
" But vim syntax region does not work if start pattern is also a keyword
|
|
|
|
" Hence added \s* below
|
2022-10-27 13:53:24 -04:00
|
|
|
syntax region logRotateScript matchgroup=logRotateKeyword start="\s*\<\%(firstaction\|lastaction\|prerotate\|postrotate\|preremove\)\>" end="\<endscript\>" contains=@logRotateSh
|
2022-10-27 11:05:01 -04:00
|
|
|
|
2022-10-27 13:53:24 -04:00
|
|
|
" for comments, todo, string
|
2022-10-26 21:57:54 -04:00
|
|
|
runtime! syntax/conf.vim
|
|
|
|
|
2022-10-27 13:53:24 -04:00
|
|
|
syntax keyword logRotateKeyword addextension allowhardlink compress compresscmd
|
2022-10-26 21:57:54 -04:00
|
|
|
\ 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
|
|
|
|
|
2022-10-27 13:53:24 -04:00
|
|
|
highlight default link logRotateKeyword Keyword
|
2022-10-27 11:05:01 -04:00
|
|
|
|
2022-10-26 21:57:54 -04:00
|
|
|
let b:current_syntax = 'logrotate'
|