dendron icon indicating copy to clipboard operation
dendron copied to clipboard

Allow Use of non-pretty Refs and pretty Refs in the same note

Open joshuajeschek opened this issue 3 years ago • 6 comments

Please select if your request is either something new or an enhancement

  • [X] Enhancement of an existing Feature.
  • [ ] Request of a new feature.

Please select the area your request applies to. (Multiple selections are Possible. You can leave blank if you're not sure.)

  • [ ] Workspace - VSCode workspace, vaults, Intellisense/autocomplete, Dendron settings
  • [ ] Lookup - Dendron's Lookup Command
  • [X] Views - Dendron Preview, Tree View, Side Panels in the UI
  • [ ] Schema - Dendron Schemas
  • [ ] Pod - Data import from / export to Dendron
  • [X] Publish - External Site Publish
  • [X] Markdown - Markdown features, such as syntax support and features

A clear and concise description of what the problem is.

Pretty Refs are really nice, one of the main reasons I like dendron. However, sometimes I feel like I want to use both pretty refs and non-pretty refs in the same note.

Describe the solution you'd like

The current syntax for refs is ![[...]]. I would the possibility to add a ! at the beginning to use the non-default for the note. So these are the two cases:

  1. Note has pretty ref enabled:
    • ![[...]] creates a pretty Ref
    • !![[...]] creates a non-pretty Ref
  2. Note has pretty ref disabled:
    • ![[...]] creates a non-pretty Ref
    • !![[...]] creates a pretty Ref

Additional context

For example, I wanted to compile a table from the contents of different notes, and with the use of pretty refs inside the table it can get pretty big, and it would be better to use non-pretty Refs in this case: image

However, I want to also use pretty refs in the rest of the note.

joshuajeschek avatar Feb 21 '22 08:02 joshuajeschek

This also could work similar to #2038, which describes adding properties to links. We could do something like ![[note]]{ usePrettyRef: false } to override the setting per link.

SeriousBug avatar Feb 21 '22 19:02 SeriousBug

ooh, that's also a good idea and would be more versatile!

joshuajeschek avatar Feb 21 '22 19:02 joshuajeschek

Whoa, I didn't know non-pretty refs existed! Wanted to ask for something like this for a long time, ha-ha 🙂 And yeah, having an option to set ref type per link would be great.

Sort of not very related, but do you know if it's technically in VSCode possible to render refs in the editor and be able to edit them in place, without having to switch to the ref file?

aleksey-rowan avatar Feb 23 '22 00:02 aleksey-rowan

if it's technically in VSCode possible to render refs in the editor and be able to edit them in place

We could display them relatively easily, but editing would be very hard. You could code up something were you insert the text temporarily then copy the changes back or something, but it might be very unstable. Display is easier because VSCode allows decorations to overlay text over the current document.

SeriousBug avatar Feb 23 '22 01:02 SeriousBug

This issue is featured in this week's round of CROP voting on Dendron's Discord server.

aleksey-rowan avatar Jul 14 '22 03:07 aleksey-rowan

The community has selected this issue as this week's CROP winner. 🎉

aleksey-rowan avatar Jul 18 '22 18:07 aleksey-rowan