--- /usr/share/vim/vimcurrent/syntax/crontab.vim 2009-03-19 15:31:04.000000000 +0000 +++ .vim/syntax/crontab.vim 2010-02-04 11:27:08.000000000 +0000 @@ -23,6 +23,8 @@ syntax match crontabHr "\s[-0-9/,.*]\+" nextgroup=crontabDay skipwhite contained syntax match crontabDay "\s[-0-9/,.*]\+" nextgroup=crontabMnth skipwhite contained +" month and day name matches are case insensitive +syntax case ignore syntax match crontabMnth "\s[-a-z0-9/,.*]\+" nextgroup=crontabDow skipwhite contained syntax keyword crontabMnth12 contained jan feb mar apr may jun jul aug sep oct nov dec @@ -33,6 +35,11 @@ syntax match crontabCmnt "^\s*#.*" syntax match crontabPercent "[^\\]%.*"lc=1 contained +" special time specifiers are case sensitive - display as an error if the case is wrong +syntax match crontabNickError "^\s*@\(reboot\|yearly\|annually\|monthly\|weekly\|daily\|midnight\|hourly\)\>" nextgroup=crontabCmd skipwhite + +syntax case match +" overrides the above with the correct case syntax match crontabNick "^\s*@\(reboot\|yearly\|annually\|monthly\|weekly\|daily\|midnight\|hourly\)\>" nextgroup=crontabCmd skipwhite syntax match crontabVar "^\s*\k\w*\s*="me=e-1 @@ -62,6 +69,7 @@ HiLink crontabDowS PreProc HiLink crontabDowN PreProc + HiLink crontabNickError Error HiLink crontabNick Special HiLink crontabVar Identifier HiLink crontabPercent Special