tpope / vim-speeddating

speeddating.vim: use CTRL-A/CTRL-X to increment dates, times, and more
http://www.vim.org/scripts/script.php?script_id=2120
969 stars 40 forks source link

Day name not incremented with date #37

Closed unknownbreaker closed 4 years ago

unknownbreaker commented 4 years ago

When pressing over the day number, only the day number increments and not the day name. Same issue if incrementing the month number--day name does not update.

2020-02-20 Thu 9:04 PM => 2020-02-24 Thu 9:04 PM 2020-02-24 Thu 9:04 PM => 2020-03-24 Thu 9:04 PM

tpope commented 4 years ago

2020-02-24 Thu 9:04 PM isn't a built-in format. Define it with :SpeedDatingFormat.

j-hui commented 3 years ago

Sorry to open this again, but I have the same issue, after defining it with :SpeedDatingFormat.

In my case, I execute:

    SpeedDatingFormat %Y-%m-%d %a %H:%M:%S

Incrementing the day seems to work when my cursor is over the day name (%a), but not when it's over any of the numeric dates.

tpope commented 3 years ago

The other formats are taking precedence. Use :1SpeedDatingFormat to give it a high priority.

j-hui commented 3 years ago

Works excellently, thanks @tpope !