How I blog
How do I blog?
If I were you (which I am glad I am not), I would ask:
How can you write such a blog without a proper content management system (CMS), no rich text user interface and no LLM that does everything for you?
Well, I don't know either. This is my second post. I don't have a good workflow yet. But I can share my current setup. It worksTM for now.
Environment
To be able to write text, you need an environment that facilitates writing. In the real world that means you need a room, a table, a chair and some writing utensils. When writing digitally you can connect your brain to your computer via USB 6 and you are ready to go. Plug and play. If you are still living in the past, you might need an operating system and other software to create a visual (or auditory (or tactile)) interface to run, view and interact with your digital pen and paper.
Operating system
Since I do not use a web application (like a CMS), I need a proper operating system for my computer. Of course that only leaves GNU/Linux. But not Arch. I am not that masochistic. I currently run Fedora with the Gnome desktop environment. It works, gets out of the way and functionality is more important for me than customization.
You might immediately ask:
Why don't you use TheMostEpicOS?! It is written in Rust! It is much better!!!1111
Or something like:
U JUST SUCK AT LINUX! I use arch btw
And yeah, I have tried different distros, desktop environments (DE) and even tiling window managers (best thing ever), but for now I run Fedora with Gnome. And will do so for the foreseeable future. Maybe once Cosmic is stable (and good), I might consider switching the DE.
Terminal
Normal people nowadays use a desktop environment with a graphical user interface to the computer, so you have more than just a text interface. It is therefore necessary to use a terminal emulator, so you get the retro hacker feeling when moving a file. Or write a blog post. You also need to use the emulator and not the real terminal, because otherwise you could not watch your favorite anime in one of your 100 open tabs in your browser on your third monitor while hacking away.
My terminal emulator of choice is currently Alacritty. It is fast, written in Rust and I have a working config.
And I currently do not want to create a new config for a different terminal. So Alacritty it is.
Multiplexer
Since one terminal window is not enough, but you don't want to have 10 terminals open, you need a multiplexer. I use Zellij, as I don't have to remember all the shortcuts (looking at you tmux). It just tells you the shortcuts. It also looks nice and has a lot a functionality I do not use.
Oh and Zellij has floating windows. In the terminal. How cool is that.
Shell
The shell is the command line interface (CLI) to your computer. It is the thing that runs in your terminal. You can use it for scripting, running commands, and it provides the environment for commands to run in.
Since everyone uses bash or zsh, I use fish. For no reason. Remember the name of the blog?
Editor
In my previous post I mentioned that I use a modal editor. And that it is not Vim. But it is also not Neovim.
I use Helix btw.
Modal editing
For those of you that do not know what a modal editor is, it is an editor that has modes.
That means that if you want to insert text you have to switch to the insert
mode.
If you want to select something you switch to the select
mode.
And if you want to move the cursor? You switch to the... normal
mode. Not the move mode. That does not exist.
At least in Vim and other Vi-inspired editors.
And guess what? The normal
mode is the default. So by default the text editor does not edit text. That is why you
cannot write anything if you do not know how to switch to the ìnsert
mode. By pressing i
. And when you want to go back
to the normal
mode? You have to press... ESC
.
You now hate modal editors and want to exit it. The very intuitive command is :q
.
Except if you changed something. Or have multiple files open.
Then you exit with :wq
or :x
or :q!
or :qa
or :qa!
or :wqa
or :xa
. Very easy.
You can of course always rage-quit if you copied a command from the internet and get stuck in Vi(m): ALT+F4
.
Or have you tried turning the computer off and on again? That always works.
So why would you use a modal editor? Because they can be 100% controlled with the keyboard.
Every key does something and the somethings can be strung together to make complex edits.
Want to delete everything between two brackets?
Just move somewhere between the brackets, then say you want to d
elete i
nside [
.
So depending on the current cursor position relative to the brackets you simply type something like:
jjjjjjjjjjjjjjjjjjjwwwwlldi[
Great stuff!
But for real, if you watch someone use a modal editor who really knows what they are doing, it looks like magic.
Helix
So why do I prefer Helix to Vim?
Helix uses Kakoune-inspired motions. Instead of stating the verb first, like the d
for delete in the example above,
you first use a motion to select what should be affected, followed by the verb.
In editors like Vim you blindly run the operation. In Helix you can see what is affected before running the operation.
Using the example from above, you would first select everything between the brackets with mi
and then delete it
with d
. Unfortunately this means you have to learn Vim motions as well as Helix motions, as many other programs use
Vim motions. But there is a lot of overlap.
Helix is very helpful. If you forget a command, verb or motion, you can easily look it up by running ␣?
.
And if you type a command, you get a pop-up that tells you what it will do. Many modes provide
helpful pop-ups like the space
mode (␣
) or goto
mode (g
). So no guessing or printing 10 cheat-sheets.
Very good for the environment.
Helix only requires minimal configuration compared to Vim, Neovim or EmacsOS. While the latter can be configured to do things very differently and be extended to a much greater degree, you have to learn a completely new programming language, if you want to properly use these editors. Or you use one of the opinionated, pre-configured versions.
Helix has many things included, that require plugins in other editors. Well, Helix does not currently have plugins. So there is that. You are stuck with the included functionality. But by using the language server protocol (LSP), Helix allows linting and code actions as well as GPT integration, as is expected from a modern editor.
For me, the only thing Helix lacks is good debugger support. That is still WIP.
HaaM (Helix-as-a-MarkdownEditor)
While syntax highlighting is built into Helix, the correct language server and linter have to be installed and added to the configuration.
To enable functionality like completions, references, renaming and diagnostics I use Marksman. So I don't have to remember the name of the file I created yesterday.
Additionally, I use LTEX as a linter. It is very useful for text-heavy files, because it uses LanguageTool as a spell checker and grammar checker. For example, it says that Neovim is not a word. Very useful.
To have beautiful files, an automatic formatter is awesome. No one likes ugly things like two empty lines at the end of the file. Or no space between a heading and the text body. I deny all PRs that have trailing white spaces and request a complete rewrite. True story. For Markdown, I found dprint. The setup experience was great, as it immediately deleted all file content that was of course not saved or committed. But, fortunately, The InternetTM provided the correct command for the Helix configuration, so the formatter does not auto-delete everything when saving. I already thought it does not like my text, not that I can blame it.
My Helix language configuration for Markdown, stored in ~/.config/helix/languages.toml
, now looks something like this:
[language-server.marksman]
command = "marksman"
[language-server.ltex]
command = "ltex-ls"
[[language]]
name = "markdown"
file-types = ["md"]
scope = "source.markdown"
roots = []
language-servers = ["marksman", "ltex"]
auto-format = true
formatter = { command = "dprint", args = ["fmt", "--stdin", "md"] }
The whole HaaM, with additional configuration not shown here, then looks something like this:

Screenshot of this blog in Helix running in Zellij running in fish running in Alacritty running in Gnome running on Fedora
It is possible to add helix-gpt that I have previously tested with GitHub Copilot, but I would prefer to host a smaller model locally. For now, I am not using any morally questionable LLM. And if I want some hallucinations there are better ways anyway. Like this segue! To the next post.