How to add brackets to selected text

Hello everybody,

Is there a way to create a macro in Logseq that automatically surrounds selected text with double square brackets []? I’d like to be able to create a custom shortcut or a command to quickly link text within my notes. Any advice on how to do this?

Welcome.

  • How do you mean it?
  • Normally you cannot have any text selected while typing.
  • But if you have text selected and type [[ , it becomes a link.

Hello, thanks for answer. yes but for example when firstly I write a note and later want make links for particular concepts i have to lose a lot of time for make and edit brackets it by hand for example:

Few words concept

[]Few words concept

[]Few words concept]]

[[Few words concept]]

Sorry, but I don’t understand your example. It should be just two steps:

  • select the desired concept
    • whether with keys or with mouse
  • press key [ two times
    • Logseq adds two closing square brackets automatically and turns the selection into a link

How could it be any faster?

1 Like

Lol sorry for such stupid question its my 3rd day after logseq course and didn’t recognize that mechanics, Thanks fo patience and being helpful :slight_smile: