[DIFF] crontab syntax: Month/Day case insensitive

70 views
Skip to first unread message

Craig Skinner

unread,
Jan 19, 2015, 10:30:46 AM1/19/15
to vim...@vim.org
Hi folks,

This is my 1st post here:

The diff below works to case de-sensitise mth/day in crontab files.

crontab(5) man page saith:
...
Names can be used in the month and day-of-week fields. Use the first
three letters of the particular day or month (case doesn't matter).
... ^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^



--- crontab.vim Fri May 18 12:05:25 2012
+++ /usr/local/share/vim/vim74/syntax/crontab.vim Sat Jan 17 17:22:48 2015
@@ -5,7 +5,7 @@
" License: This file can be redistribued and/or modified under the same terms
" as Vim itself.
" Filenames: /tmp/crontab.* used by "crontab -e"
-" Last Change: 2012-05-16
+" Last Change: 2015-01-17
"
" crontab line format:
" Minutes Hours Days Months Days_of_Week Commands # comments
@@ -22,11 +22,11 @@ syntax match crontabMin "^\s*[-0-9/,.*]\+" nextgroup=c
syntax match crontabHr "\s[-0-9/,.*]\+" nextgroup=crontabDay skipwhite contained
syntax match crontabDay "\s[-0-9/,.*]\+" nextgroup=crontabMnth skipwhite contained

-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
+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

-syntax match crontabDow "\s[-a-z0-9/,.*]\+" nextgroup=crontabCmd skipwhite contained
-syntax keyword crontabDow7 contained sun mon tue wed thu fri sat
+syntax match crontabDow "\s[-A-z0-9/,.*]\+" nextgroup=crontabCmd skipwhite contained
+syntax keyword crontabDow7 contained Mon Tue Wed Thu Fri Sat Sun

syntax region crontabCmd start="\S" end="$" skipwhite contained keepend contains=crontabPercent
syntax match crontabCmnt "^\s*#.*" contains=@Spell



Cheers.
--
The press conference "THEY" didn't want broadcast:
http://www.youtube.com/watch?v=Bzim6hQUoC8&index=18&list=PLHLREeMe4S0OmV_BYAfWNWi0qQzu2FWzK

James McCoy

unread,
Jan 19, 2015, 11:04:57 AM1/19/15
to vim_dev, David Nečas

Adding David, the maintainer for the file.

On Jan 19, 2015 10:30 AM, "Craig Skinner" <ski...@britvault.co.uk> wrote:
>
> Hi folks,
>
> This is my 1st post here:
>
> The diff below works to case de-sensitise mth/day in crontab files.

This was already fixed back in 2011 (c.f. revision 0877b8d6370e) but was lost in 2012 (c.f. revision 1b584a6f44c). It seems like the "syn case ignore"/"syn case match" statements should be readded.

Cheers,
James

Christian Brabandt

unread,
Jan 21, 2015, 3:10:50 PM1/21/15
to vim...@googlegroups.com, vim...@vim.org, ski...@britvault.co.uk
This has also been requested in issue 132 (https://code.google.com/p/vim/issues/detail?id=132).
@Bram, the maintainer seems to be unreachable and this is a relative small change, so perhaps you'd like to include that change nevertheless.

Craig, would you volunteer to maintain that file, since the maintainer does not appear to be active anymore?

Best,
Christian

James McCoy

unread,
Jan 21, 2015, 8:59:11 PM1/21/15
to vim...@googlegroups.com
On Wed, Jan 21, 2015 at 12:10:50PM -0800, Christian Brabandt wrote:
> This has also been requested in issue 132 (https://code.google.com/p/vim/issues/detail?id=132).
> @Bram, the maintainer seems to be unreachable and this is a relative
> small change, so perhaps you'd like to include that change
> nevertheless.

David responded in this thread.

Cheers,
--
James
GPG Key: 4096R/331BA3DB 2011-12-05 James McCoy <jame...@jamessan.com>

Bram Moolenaar

unread,
Jan 22, 2015, 4:40:52 PM1/22/15
to David Nečas, James McCoy, vim_dev

David Yeti wrote:

> tl;dr
> Bram, please update crontab.vim syntax file to the attached version.
>
> On Mon, Jan 19, 2015 at 11:04:54AM -0500, James McCoy wrote:
> > On Jan 19, 2015 10:30 AM, "Craig Skinner" <ski...@britvault.co.uk> wrote:
> > >
> > > Hi folks,
> > >
> > > This is my 1st post here:
> > >
> > > The diff below works to case de-sensitise mth/day in crontab files.
> >
> > This was already fixed back in 2011 (c.f. revision 0877b8d6370e) but was
> > lost in 2012 (c.f. revision 1b584a6f44c). It seems like the "syn case
> > ignore"/"syn case match" statements should be readded.
>
> Mea culpa.
>
> I do not keep any own master version for these old and rarely updated
> files and consider the version in Vim canonical. Unfortunately, I based
> the update following the case sensitivity fix on the wrong version so
> the first fix was lost.
>
> I am attaching a version contaning both changes and Ccing Bram.
>
> Since my ‘maintainer’ role consists nowadays in forwarding a fix
> provided by other people every couple of years to Bram (and messing it
> up in the process occasionally), I am not sure if I actually add any
> value. But, well...

I'll include this version, thanks.

The role of the maintainer is to check the changes, if they actually
work. How that's done is completely up to the maintainer. And then
send the best version to me.

--
hundred-and-one symptoms of being an internet addict:
104. When people ask about the Presidential Election you ask "Which country?"

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Craig Skinner

unread,
Jan 24, 2015, 9:36:45 AM1/24/15
to vim...@vim.org
On 2015-01-21 Wed 12:10 PM |, Christian Brabandt wrote:
>
> This has also been requested in issue 132 (https://code.google.com/p/vim/issues/detail?id=132).
> @Bram, the maintainer seems to be unreachable and this is a relative small change, so perhaps you'd like to include that change nevertheless.
>
> Craig, would you volunteer to maintain that file, since the maintainer does not appear to be active anymore?
>

Yes, if needed.

Cheers,
--
Craig Skinner
http://www.bbc.co.uk/programmes/b03mtrg9/clips

Craig Skinner

unread,
Jan 24, 2015, 9:40:13 AM1/24/15
to vim...@vim.org, David Ne??as, James McCoy
On 2015-01-22 Thu 22:40 PM |, Bram Moolenaar wrote:
>
> David Yeti wrote:
>
> > tl;dr
> > Bram, please update crontab.vim syntax file to the attached version.
> >
>
> I'll include this version, thanks.
>

Has this been committed?

Cheers,
--
Craig Skinner
Why modern men aren't perfect commitment marriage drones:
http://www.youtube.com/watch?v=rlvMAS_20K4

Christian Brabandt

unread,
Jan 26, 2015, 8:00:03 AM1/26/15
to vim...@googlegroups.com
Am 2015-01-24 15:40, schrieb ski...@britvault.co.uk:
> On 2015-01-22 Thu 22:40 PM |, Bram Moolenaar wrote:
>>
>> David Yeti wrote:
>>
>> > tl;dr
>> > Bram, please update crontab.vim syntax file to the attached version.
>> >
>>
>> I'll include this version, thanks.
>>
>
> Has this been committed?

Yesterday:
http://code.google.com/p/vim/source/detail?r=435956324539eea89a17f0409a15b588973c0cb9

Best,
Christian

Craig Skinner

unread,
Jan 26, 2015, 1:14:03 PM1/26/15
to vim...@vim.org
On 2015-01-26 Mon 13:59 PM |, Christian Brabandt wrote:
> >>
> >>I'll include this version, thanks.
> >>
> >
> >Has this been committed?
>
> Yesterday:
> http://code.google.com/p/vim/source/detail?r=435956324539eea89a17f0409a15b588973c0cb9
>

Aye, that works.

Cheers!
--
Craig Skinner
Multiple award winning "2nd Class Citizen" short film:
http://youtu.be/AVUHalR8P0I
Reply all
Reply to author
Forward
0 new messages