This post was supposed to exist three weeks ago.
If someone is following this blog, you might have realised I have not posted anything in the last three weeks, and that is a shame on me. The reason is simple: I was back home in Spain for three weeks. The idea was to keep writing from there every week (and that is why I flew with three laptops in my bag). A lot of things happened.
First thing that happened, my cat, one of the best things that has ever happened to me, died from illness two days after I got there. I am thankful because I was able to say goodbye one last time, but as you can imagine, that hurt a lot. After the grief (I cried a lot, trust me), I decided to spend my time with my people there and enjoy what home has to offer (which I did, btw).
Now I am back home in Ireland, and I am motivated and ready to get on my next challenge, which I will mention later on in this post.
The project
There is one project I have been wanting to delve into for a long time (there are actually many). It is something I have never done before (I tried but did not finish it), and I believe it will be a big challenge: a text editor.
Why I want to build a text editor in the first place has a story behind it. Back in the day when I started working as a Software Engineer, my company gave me a laptop that was, let’s say, not ideal. What I mean by that is that it took me around 20 minutes to load or restart Docker containers. What is even worse, it took me five full minutes to start my code editor at the time, Visual Studio Code.
Naturally, the first thing that came into my mind when I realised that issue was: “Okay, if I cannot use VS Code, I just need to build my own editor. How hard can it be?” Oh, poor me. Soon enough I realised what building a text editor really meant: from file manipulation, to LSPs, to even cursor actions… it is definitely NOT an easy task, and it was something I was not prepared for. So I ended up just learning how to use NeoVim, an editor I love and probably one of the best choices I have made throughout my career as a software engineer.
The idea for this project is NOT to replace NeoVim in my current workflow as an editor (as I said, I love NeoVim and I do not see myself changing it soon), but to gain some extra knowledge and learn more in depth how things work under the hood.
The challenge
As always, I will be building this from scratch (with the help of some libraries), and I will add some constraints to it:
- The editor should be performant: I do not want to go back to waiting five minutes to open a single instance of an editor.
- The editor should support both Vim and regular mode: As a NeoVim user, this is something I really want to do. I am just too used to some of the Vim motions, and working with a regular editor feels odd to me (however I understand regular mode is necessary for most users).
- The editor should have an integrated terminal: I am not building a terminal editor like NeoVim. That means it needs to have an integrated terminal. We will see how I handle that. I will build a terminal emulator at some point, but let’s tackle one project at a time.
- And ideally:
- I want it to have extensions (similar to what VS Code or Zed does).
- The layout should ideally be customisable: I do not enjoy when editors force you to have a static layout with specific functionalities you might never use.
That is my challenge, and it might take a while to finish it, because I will be building the project in one of the programming languages I have wanted to learn for a while but never made the effort to learn. There are two options: either Rust or Zig, we will see how that goes.
I will update you next week, and as always, thanks for reading.