Is there any way to insert special characters?

like any characters in unicode, I want to add some circled number into my notes. It seem it support paste special char from other position. But how can I add any one?

One way in Windows is Win+. and select from there. If you use if often it’s faster to create a text expander custom command in config.edn (or your text expander of choice -Expanso maybe) and use it from there.

For example, in :commands [ section of config.edn I have many like these:

	[ ">>"," → " ]
	[ "{"," ← " ]
	[ ".","☑️" ] ;; Checked (DONE)
	[ "0","🔳" ] ;; UnChecked (not done -yet)
	[ "..", "🛠️" ] ;; WIP / DOING
	[ "...", "↗🗓️" ] ;; Deferred / Postponed
	[ "|", "❗🔏" ] ;; Blocking Point / Blocked
	[ "X", "❌" ] ;; CANCELLED	
	[ "-","⛔" ] ;; Not DONE / Failed

Then I just do <.. + Enter and I get the :hammer_and_wrench:symbol.

Hope it helps.

3 Likes

Thanks for replying! It helps. But I’m wondering is there anyway to insert special chars by using Unicode?

Welcome.

  • Not sure how you mean it.
  • Maybe with a macro?
    • definition: :u16 "<span>&#x$1;</span>"
    • usage: {{u16 2467}}
    • result: ⑧

Sorry for confusing you. It seems your way worked by manually adding every single macro, too. I meant if I can use any Uncode char by using its code by using some spetial grammar or other methods, just like when I type “\u2467“ I could get a ⑧ in JS.

  • My way uses a single macro that supports all special characters by itself.
    • This is not one macro per character.
  • Then instead of \u2467 you write {{u16 2467}} and you get the ⑧ in Logseq.
    • You may even shorten the name to just u and the actual typing becomes {{u 2467
      • Because the closing curly braces are added automatically.

Got it, thanks a lot! I spent some time figuring out the config.edn as I wasn’t famiiliar with this before :blush:

Also, thank Florian. It’s a convenient method to add characters separately. I found that :custom might have been replaced by :command recently.

yeah it’s " :commands ["… I corrected the post above …:see_no_evil:

on the subject:

  • you can put this in :commands [:
	["u" [ [:editor/input "{{u16 }}" {:last-pattern "<" :backward-pos 2}] ] ]
  • and this in :macros {:
:u16 "<div class='kit' data-kit='expandmacro'>&#x$1;</div>"

, assuming you installed kits… the above would have you do:

<u Enter (or Tab)
2467 Esc

Dunno if it’s in any way easier than {{u 2467 Esc … you judge.

PS… I wonder why, sometimes, in the right sidebar, some macros auto-execute without me exiting the edit mode … I even have to quickly write inside it otherwise it would execute …

I myself find it reasonable to expect that a Tab would execute the macro so I don’t have to exit the Editor just to have the macro execute, then go back inside the Edit Mode to continue writing.

1 Like

Thanks, I’ll have a try.