argenos / nldates-obsidian

Work with dates in natural language in Obsidian

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add a default alias option that can be overridden with Shift + Enter

colinphill-reify opened this issue · comments

I would like to have a way to insert a link to a daily note while:

  1. specifying the folder, so that clicking the link for a non-existing file creates a note in the correct place
  2. aliasing the link by default to hide the folder name, for a tidier appearance in reading view and live preview
  3. keeping open the option to use Shift + Enter to use the natural language input as an alias

A workaround is described in #37. However, the link inserted that way will look like [[Daily Note/2022-04-20]], displaying the folder in reading view.

The workaround can be adapted by including an alias in the date format, i.e., [Daily Note/]YYYY-MM-DD|YYYY-MM-DD. However, when using Shift + Enter to use the natural language input as an alias, the link will be malformed, as [[Daily Note/2022-04-20|2022-04-20|today]].

I suggest having separate configuration options for the link target format and the default alias format, with the latter being optional and, if set, overridden with Shift + Enter.