I'm new to Vim and I'm trying to see what I can / can't do with it. I would like to increment a list of times like this :
09:00 Breakfast
09:30 RSS
09:50 Stretch
10:00 Main proj
13:00 food
14:00 Main proj...
Lets say I woke up too late, and I'd like to quickly increment everything by 45 minutes in Vim
I tried a macro :
- Time in minutes :
09:00 -> 09 * 60 + 00
+ 45
- SUM with Ctrl + R =
- Trying to reformat it
(int)SUM/60 : SUM - ((int)SUM/60)*60
But I couldn't get it to work (it is such a long macro) and I'm quicker at doing it manually.
On top of that, even if I succeed I can't figure out how to keep the "0"
of "09"
to keep my numbers in a column.
Is it possible in Vim ? Maybe a regex ?
[edit] For the purpose of exercise, I'd rather use macros, a regex, or even a function in VimScript than a plugin