Written in Nano
I’m going to attempt to write out this entire post in Nano. It has spot-on markdown syntax highlighting and that’s all there is to it.
It looks very cool when typing in here; I’m writing in a distraction-free environment (not even an active spell-checker in sight) but hey… you wanna flow on the writing? This rocks.
The default colours look wonderful — I’ve set my terminal to have a tiny bit of transparency so as to dim the bright colours somewhat.
Why Nano?
Gedit is ticking me off. First, there was the missing 3-backticks code fence syntax highlighting missing from the markdown.lang file. After much troubleshooting, I added it back…this problem exists on both Linux Mint 22.1 and 22.2 so is likely coming from upstream Ubuntu’s build. With the missing logic, all code fences were appearing in my drafts as plain-text, black (no colour).
The below context was entirely missing from /usr/share/libgedit-gtksourceview-300/language-specs, a mission in itself to locate this; should this not be in /usr/share/gtksourceview-3.0 which itself holds the correct file?
<context id="3-backticks-code-span" class="no-spell-check" style-ref="code">
<start>^```.*$</start>
<end>^```$</end>
</context>
Secondly, I was writing something which included two HTML links in the same line in a Markdown document. As they were on the same line, Gedit formatted the plain-text in between the links as italics and colour, making those words appear as if they were part of the links.
Both items are bugs and incredibly distracting when writing in plain Markdown with syntax highlighting. It ends up looking all wrong.
So, mix those two recent episodes with my other issue where I launched Gedit from the command line and it ended up messing up my system to such an extent that I needed to reinstall Linux Mint. The last straw, I would think.
That’s why Nano.
I can also now add a quick code fence here and it is correctly highlighted!
I did have a play with Geany, another excellent application for text and code but it is a bit too heavy for when I just want to write a little Markdown with pretty colours. There is a lot happening on that Geany interface and it is rather nice to have a plain typing surface like in Gedit to help stay focussed.
I had forgotten most of the shortcuts and default key bindings for Nano; after a quick read of the docs, it all came flooding back to me. I have also completed setting up my nanorc and I’m now cooking with gas.
What I immediately missed from Gedit was the ability to have snippets, particularly for my front matter and my date string. No bother; two bash scripts later and all I need to do is Ctrl+T + <call the script> and bang! Front matter in and date/time in, showing time in UTC.
Another reason why I didn’t replace Gedit with Geany was due to yet another syntax highlighting issue in yet another application. Everything worked in Geany with the exception of HTML links in Markdown files. Those appeared as plain text. Geany was happy with markdown-style links but I prefer adding HTML links in my files, so we did not get along too well. A real “Toe-may-toe / Toe-mah-toe” problem, so we called the whole thing off. I get to keep the pets.
And the new pet is called Nano.
Verdict: Wonderful for typing blog posts in Markdown files in a distraction-free environment with CORRECT syntax highlighting which actually bloody works. Not bad for a program written in 1999.
