Faster linking with [[

I’d like to be able to create backlinks using [[ or @ like other note-taking software allows, rather than using the /=>^ notation, which pulls you out of the note-taking flow a bit.

5 Likes

Hi @chuckharmston, thanks for the feature request.

We have plans to improve this, and hopefully we can get something out soon for you! In the meantime did you know you can select some text that shares the name of a card you have and then press / to immediately open and autofill this phrase in the ‘Link Coupler’ menu? Then just press enter to apply the link :slight_smile:

5 Likes

Hi!
To expand on this, we can currently easily select text and after pressing / we can create a new card, which is convenient. But when we want to add links (to yet undefined cards), it is a bit clunky.

For example I’m writing a list of apps, and I want to make a card for each app.

  1. I can write the list and then manually select each item and press / to create a link, enter to confirm, and cmd + enter to exit (this is 5 steps)
  2. I can press /, type ‘link’ (or just l), then type the name of the card, press enter, and cmd + enter (this is 5 steps)

it makes the experience of “adding a list of links to other cards” not very smooth. I wonder if we can either skip the cmd + enter confirmation to exit editing mode of newly created cards, or have [ trigger card search, if no match is found, supernotes can propose creating and immediately linking a card when we close the brackets ], this would turn it to 2 steps.

Alternatively, we could select lists and have an option to turn them all into cards at once

1 Like

Hi @nhlism,

Welcome to the Supernotes community! These are some great suggestions. Fortunately, one that you’ve mentioned is already being implemented right now. We’re currently working on improving the editor and one these improvements is to make inline interactions a lot faster and smoother.

Part of this, is converting the Universal Coupler (the menu that opens after pressing /) to appear inline. You will also be able to jump straight into certain options, such as parents and links, with keybinds – we’re still testing the best combos at the moment. But it’s currently looking like [[ for card links and >X where x is any alphanumeric character.

Looking forward to sharing this with you soon!

6 Likes

Now this is implemented, may I ask, what is the rationale behind links created using [[ seemingly being an immutable link object, sort of, while the coupler-based approach just yields (MarkDown) text?

I have yet to be convinced this is a good idea :eyes:

We wanted to simplify things, one of the biggest barriers but also the benefits of Supernotes is Markdown, so we’re experimenting with making things like card links (and eventually actual url links) to be simpler, especially for new users.

You’ll notice that the card link coupler in the UC still has the original behaviour, if you prefer that. Our current thinking is potentially having it so that if your cursor goes within the card link block it will expand to reveal the entire link markdown code. Let us know if you have any thoughts on this below.

Yeah, I imagine this behaviour is more newbie-friedly. However, I was more onto the fact that both methods act differently. I might sound like a broken record, but: consistency.

Well, I am certain you’ll figure something out. I like the idea that clicking a link object expands it to text.

Haha this inconsistency was done on purpose as we didn’t want to break some people’s existing workflows. But definitely get your point, this will be homogenised in a 3.1.X update!

How are link-objects even exported? Would [](^1234-abcd-5678-efgh) be a potential MarkDown-friendly syntax for a non-aliased link that would display the linked card’s title?

A benefit I would see is the simplicity of switching between aliased and non-aliased links.

Yep, that is actually what is going on under-the-hood. Any card link that doesn’t have a title/alias is being automatically converted to a little widget with the card name inserted dynamically. You can test yourself by just removing the title from an existing card link – it will turn into one of the new-style widgets.

The homogenization plan is to have it so that all card links just show the title (whether auto or provided) as the little widget in the editor, but if you put your cursor next to the link it will expand into the markdown link syntax. This is what already happens with inline images, latex blocks, and mermaid blocks.

Will ship this in 3.1.1 and see what everyone thinks. :blush:

5 Likes

Dunno what everybody thinks, but I think this is the best solution for linking content out there, period.

Watching Supernotes evolve is such a joyful experience :blush:

3 Likes

@freisatz Totally agree! The new inline linking in 3.1.1 addresses all of my concerns about aliased versus non-aliased link titles. It’s game changing! :heart:

Though the downside is that now I have to go through thousands of cards and convert most of the links to non-aliased! :sob:

1 Like

I spoke too soon! I just started the “great non-aliased migration”, and immediately noticed that the automatic titles for non-aliased links get cutoff after 30 characters (when editing). That’s usually way too short to understand the content of the notecard.

SCR-20240604-nqjd

@Tobias What’s the thinking behind the limit? Is it possible to increase it to something more generous like 140 characters?

The idea of that was so that it wouldn’t be massively jarring when going between the raw link markdown and the title widget, as 30 chars is approximately the same length as a card ID (though in retrospect we really should’ve made it 40 for that purpose). Otherwise if you have a very long card name your cursor kinda moves all over the place if you end up moving the cursor to the link region.

Also it looks kinda meh when the widget spans multiple lines so we were trying to reduce the occurrences of that as well.

1 Like

@Connor But don’t short titles create a similar jarring effect the other way?

I’d prefer to see the whole titles and I’d happily put up with some slight jarring when clicking to edit (because I’ll read the links much more often than I edit them). But if you don’t like that idea, would you consider increasing the limit to 40 or 45 characters?

Yes but it made even less sense to make short titles longer. :grinning:

We can definitely revisit this, I can see how 30 might be a bit too short and 40 is better anyway. However as usual we will see if we can’t come up with something even better to hopefully get the best of both worlds.

1 Like

We’ve made some small improvements to the card link widgets in Supernotes 3.1.2, and therefore removed the length limit we had in place previously :boom:

2 Likes

@Connor Is there a specific reason why adding a link with [[ also adds a trailing space?

For all of my use-cases, not adding a trailing space is preferable.

Hi @JamesT,

So there’s a few reasons why we did this.

  1. For consistency, we wanted the behaviour for all the inline couplers to be the same, so the link and emoji couplers will always append a space at the end.
  2. For speed, usually card links / emojis are written in the middle of sentences so adding a space is usually helpful rather than hindering.
  3. For clarity, our card links only render fully when you are a space away. If your cursor is beside a card link it will just show you a UUID which is a little confusing and causes your cursor to jump when you tap space.

I hope that helps, and I definitely understand it might take a little while to get used to. If you have any further suggestions / ideas we are all ears!

@Tobias Your arguments all make sense.

However, the difference between an emoji and a link is that I’ll almost always want to enter an emoji as I’m tying, whereas I’ll almost always want to convert text to a link after I’ve finished typing.

For example, first I’d type the complete sentence “The process of routing the outputs of a system back as inputs, creating a loop.”, then I’d highlight “outputs” and convert it to a link, then I’d highlight “inputs” and convert it to a link. Currently, doing that adds two extra spaces, which I don’t want.

Suggestion: if there’s already a space character trailing the linked text, don’t add another one.