vim-ledger
vim-ledger copied to clipboard
Add syntax highlighting rules for timesheet format
I'd love to have timesheet format highlighted.
i 2013/11/06 09:00:00 Billable:Frobnostication
o 2013/11/06 13:00:00 ;
i 2013/11/06 13:00:00 A:Vacation
o 2013/11/06 17:00:00 ;
What would be really awesome is zebra striping of some kind that shows paired lines.
That's a pretty neat idea.
I currently do not use timesheets myself. Is it common to have files where clock directives are interspersed with regular transactions? I otherwise quite like the zebra striping idea.
I don't know of others' usage, but I keep my time separated from transactions.
"Johann Klähn" [email protected] wrote:
I currently do not use timesheets myself. Is it common to have files where clock directives are interspersed with regular transactions? I otherwise quite like the zebra striping idea.
Reply to this email directly or view it on GitHub: https://github.com/ledger/vim-ledger/issues/13#issuecomment-29141861
Sent from Kaiten Mail. Please excuse my brevity.
Okay, also to clarify on zebra striping. Do you want one pair of i…⏎o…
to have the same color (so that the next pair has a different color)? Or do you just want o
-lines to have a color different from i
-lines? While I can see both cases as useful, the former has no straight-forward approach that I know of (or could come up with in 10 minutes).
I envisioned it being pairs, but I could see the use of having all i
rows being one color and all o
rows being another color, with perhaps some kind of highlighting for two rows of the same type that are together erroneously.
I actually kinda like that latter example better.
i <- these rows get no background color
o <-
i <- these rows get a barely visible background color
o <-
i <- these rows get a red or other notable background color
i <-
o <- this row gets the color that it should have if the row above wasn’t in error state
i
o
Ah, to come back to having to track time and looking for syntax highlighting for it, only to find that I previously voiced my desire for it!
Maybe I'll get around to doing it myself in the next four years…
Contributions welcome! I don't (yet) use time sheet functions, but having support in this plugin would be welcome and I'll be happy to review any PRs to that effect.