davraamides / todotxt-mode

MIT License
59 stars 12 forks source link

Make the note filename pattern customizable #25

Closed phybros closed 3 years ago

phybros commented 3 years ago

Right now using the Create note for task command will make a file called [Task]-Note-20210210-143437.md where the [Task] part is highlighted.

I'd love to be able to have the date/timestamp first and the [Task] second.

phybros commented 3 years ago

I see it's hardcoded at https://github.com/davraamides/todotxt-mode/blob/master/src/note.ts#L34 maybe we could make a new setting which lets you do a pattern e.g. the default would be \[Task\]-Note-%d-%t.md or something along those lines. Then make valueSelection just the range between the square brackets (if there are any in the pattern)?

davraamides commented 3 years ago

That's a good suggestion and seems pretty straightforward to implement. I will try and knock it out soon.

davraamides commented 3 years ago

Fixed with 1.4.20. See the change log for details.

phybros commented 3 years ago

Nice! This is perfect. One nitpick though, the changelog says [Task] but the default setting uses [Todo]

davraamides commented 3 years ago

Shoot - my bad. I'll fix the changelog.

On Wed, Feb 10, 2021 at 7:07 PM Will Warren notifications@github.com wrote:

Nice! This is perfect. One nitpick though, the changelog says [Task] but the default setting uses [Todo]

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/davraamides/todotxt-mode/issues/25#issuecomment-777124387, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOOZGLICXPZDXCUWKJT2JDS6MNUPANCNFSM4XNRPM7Q .