argenos / nldates-obsidian

Work with dates in natural language in Obsidian
MIT License
497 stars 46 forks source link

Support `@time:now`, `@time:+15 minutes`, etc in auto-suggest #44

Closed bezhermoso closed 3 years ago

bezhermoso commented 3 years ago

First off, thanks for writing this plugin: I very recently decided to adopt interstitial journaling and I find this plugin to be a great companion – irreplaceable even – for doing so in Obsidian.

Among the things I like about this plugin is the auto-suggest feature to insert date slugs from a natural language date input via @. What I wish it can do is insert time-strings via this feature. I know there is a command that does exactly this from the command palette, which works well, but I think an @-based expansion would be more streamlined and much quicker in practice, especially when you are in a writing flow.

So here is a PR to support that:

Screen Shot 2021-06-01 at 4 24 00 PM

(I personally find it a bit off that these @time:... suggestions do not expand to a link like the date-based ones, but I think it makes more practical sense.)

argenos commented 3 years ago

Hi @bezhermoso! Thanks for the PR, and sorry it took me so long to get to it! It all looks good to me! I've requested a review from @liamcain just in case he has some time to take a look, but in case he doesn't, I'll merge later this week. Cheers!