Build your own text editor in Zig (the mdbook)

When I posted about Port of kilo editor to zig, I said I wanted to write a guide similar to the original Build Your Own Text Editor.

Now I finished it and it’s here. Comments welcome.

Repo with source code

The code branch has the source code, divided by chapters, so you can also go through it without typing the code yourself, in the readme of the repo there are tips on how you can do that.

If you read it and find mistakes, oversights or bad/wrong explanations of language concepts/features, please tell me, I don’t want to spread bad habits/notions.

There are especially a couple ‘digressions’ about the language that would need to be checked for their validity, for example:

panic
comptime
default initializers for structs, undefined
assignments
casting numbers
ArrayList strategies
inline

Thanks.

28 Likes

this look like something fun to read during my weekends :smiling_face_with_sunglasses:

Just finished ziglings and this is exactly what I was looking for next. Thanks for this!