Easier ("intelligent") mouse control when marking text (linking, ...)

When having selected text AND pressing square bracket in order to create link, automatically reduce selection by leading and trailing whitespace characters (newline, space, tab,…) so that they are preserved outside of link, not inside.
Now I need to move cursor very precisely when creating link from existing text.

Other thoughts:

  • Add a command to turn this functionality off in case, someone wants to write some code in Obsidian editor.
  • Or perhaps do not trigger this functionality in code-blocks.
  • Might apply also to trailing colon “:”, dot “.”, … (for links at the end of sentence)
  • and perhaps also when other paired symbols (instead of square brackets) are pressed.
2 Likes

I like this idea, though I think it would be better implemented if Obsidian cut leading/trailing whitespace from the link creation rather than mouse-selection. (I would think there’s a devil in my CPU if my apps started adjusting what I was selecting for me. See also the infuriating iOS text selection UX…)

I agree, the selection should remain as is, unless user starts creation of link by pressing the square bracket.

1 Like

I think this would be great with formatting text too