How to use easily utf-8 characters
21 July 2024 | 10:51 pm

Sometimes, you want to add a UTF-8 character in the text you write, but you don’t know how to insert it.

Vim/Neovim has an easy way to solve that.

In theory, it could be done with the keybinding CTRL-V + decimal number of the character, but I always had issues with that.

Maybe, it’s my Vim/Neovim configuration, but I always struggled with that.

There is an easier way!

Have you heard about digraphs?

From the :h digraphs :

Digraphs are used to enter characters that normally cannot be entered by an ordinary keyboard. These are mostly printable non-ASCII characters. The digraphs are easier to remember than the decimal number that can be entered with CTRL-V.

So, how does it work?

Pretty easily in fact. To see all the characters available, type :dig[raphs] (both :dig and :digraphs work).

You can add :dig! to print headers to make it easier to find the characters you are after.


 [...]

 Roman numbers
 1R Ⅰ 8544 2R Ⅱ 8545 3R Ⅲ 8546 4R Ⅳ 8547 5R Ⅴ 8548 6R Ⅵ 8549
 7R Ⅶ 8550 8R Ⅷ 8551 9R Ⅸ 8552 aR Ⅹ 8553 bR Ⅺ 8554 cR Ⅻ 8555
 1r ⅰ 8560 2r ⅱ 8561 3r ⅲ 8562 4r ⅳ 8563 5r ⅴ 8564 6r ⅵ 8565
 7r ⅶ 8566 8r ⅷ 8567 9r ⅸ 8568 ar ⅹ 8569 br ⅺ 8570 cr ⅻ 8571

 Arrows
 <- ← 8592 -! ↑ 8593 -> → 8594 -v ↓ 8595 <> ↔ 8596
 UD ↕ 8597 <= ⇐ 8656 => ⇒ 8658 ==8660

 Symbols
 *2 ★ 9733 *1 ☆ 9734 <H ☜ 9756 >H ☞ 9758 0u ☺ 9786 0U ☻ 9787
 SU ☼ 9788 Fm ♀ 9792 Ml ♂ 9794 cS ♠ 9824 cH ♡ 9825 cD ♢ 9826
 cC ♣ 9827 Md ♩ 9833 M8 ♪ 9834 M2 ♫ 9835 Mb ♭ 9837 Mx ♮ 9838
 MX ♯ 9839

 Dingbats
 OK ✓ 10003 XX ✗ 10007 -X ✠ 10016

 [...]

Every character has three columns. Let’s break down the digraph cH ♡ 9825:

  • Digraph cH this is the combination of the two characters that you use as an input
  • ♡ is the character you want to print
  • 9825 is the decimal Unicode for the ♡ character.

To be able to print that character in Vim/Neovim, in Insert mode type CTRL-K then cH, and that will print the little heart.

The last column is not used with this default keybinding.

Easy, no?

  Post 54/100 - Round 5 of the 100DaysToOffload challenge !


Obsidian is back
19 July 2024 | 8:53 am

It is back on my phone, and I even installed the Linux version.

While I wasn’t really using it before, I always loved its graph view. It helped me to spot some isolated notes with better tags to add connections.

My notes taking system evolved over time:

Basically, all my notes are written in Neovim, in a Zettelkasten directory with all of them.

That directory is used as my vault for Obsidian. I changed my note template because tags were huge in Obsidian. I don’t know why, but it was fixed when I moved them at the bottom of the note.

For those using Neovim, my Lua snippet looks like this:


 cs(
 "zt",
 fmt(
 [[
 # {} {}


 ---
 source: {}
 author: {}

 related to:

 tags: {}
 ]],
 { i(1, ztDate()), i(2, title()), i(3, ""), i(4, ""), i(5, "")}
 ),
 ""
 )

ztDate and title are two functions that add the date, and the … title of the note.

When I type zt[tab] in Neovim, it expands the note like this:


 # 20240719T135308 Title of my note


 ---
 source:
 author:

 related to:

 tags:

I mentioned before Marskman which is an LSP for Markdown files. It allows you to quickly search, and link notes between them.

That’s why for the “author” part of my notes, I use #NameSurname to tag them. Then, Marksman will provide a list of authors that is aware of. Pretty helpful.

I don’t use the Sync option that Obsidian provides ($4/month). I set up a Syncthing to be able to synchronize my laptop, and mobile phone over my home wireless network. The idea is not really to use Obsidian on the mobile, but more to have access to them whenever I want.

The Obsidian community has many plugins, but I didn’t check them because my current setup works well for me. Obsidian gives me a great way to visualize orphaned notes without any link, and to have them available in my pocket.

Conclusion

Obsidian is a pretty fast app, which I love! It helps me to quickly find a note, and allows me to have access to them all the time.

Currently, my vault is pretty small, so I’m curious to see how it behaves with 10k, 15k or 30k notes.

I might use it on mobile to add notes, or maybe I won’t – you never know!

I guess the future will tell me!

  Post 53/100 - Round 5 of the 100DaysToOffload challenge !


Throwback Thursday 002 - World Cup 2018
18 July 2024 | 12:00 am

After the French team’s epic victory over Croatia, thousands of supporters flooded the streets of Paris in a joyous celebration.

The Champs-Elysées was one of the main destinations, and it was incredible to see the sheer energy and excitement in the air.

Despite the late-night celebrations, everything remained peaceful and fun until the early hours.

The Champs-Elysées with many supporters after the victory of France over Croatia in 2018. At the background of the image you can see the sunset and the Arc of Triumph
Champs-Elysées - France, July 2018 - Fujifilm XPro2

  Post 52/100 - Round 5 of the 100DaysToOffload challenge !



More News from this Feed See Full Web Site