# Writing an editor in less than 1000 lines of code, just for fun

DevFeed: [Writing an editor in less than 1000 lines of code, just for fun](<https://devfeed.tech/articles/writing-an-editor-in-less-than-1000-lines-of-code-just-for-fun-20599.md>)

Original publisher: [Read original article](<http://antirez.com/news/108>)

Published: 2016-07-10T10:51:11Z

Content type: opinion

Language: en

Sources: [Antirez](<https://devfeed.tech/sources/antirez.md>)

Topics: [Code](<https://devfeed.tech/topics/code.md>), [C](<https://devfeed.tech/topics/c.md>), [Terminal](<https://devfeed.tech/topics/terminal.md>)

Tags: [blog-post](<https://devfeed.tech/tags/blog-post.md>), [c](<https://devfeed.tech/tags/c.md>), [code](<https://devfeed.tech/tags/code.md>), [terminal](<https://devfeed.tech/tags/terminal.md>)

## AI overview

The author describes writing a text editor in fewer than 1,000 lines of code as a personal project. The editor does not depend on ncurses and supports syntax highlighting and search, motivated partly by reflections on Nano's usefulness on random systems.

## Source excerpt

WARNING: Long pretty useless blog post. TLDR is that I wrote, just for fun, a text editor in less than 1000 lines of code that does not depend on ncurses and has support for syntax highlight and search feature. The code is here: http://github.com/antirez/kilo. Screencast here: https://asciinema.org/a/90r2i9bq8po03nazhqtsifksb For the sentimentalists, keep reading... A couple weeks ago there was this news about the Nano editor no longer being part of the GNU project. My first reaction was, wow people still really care about an old editor which is a clone of an editor originally part of a terminal based EMAIL CLIENT. Let's say this again, "email client". The notion of email client itself is gone at this point, everything changed. And yet I read, on Hacker News, a number of people writing how they were often saved by the availability of nano on random systems, doing system administrator tasks, for example. Nano is also how my son wrote his first program in C. It's an acceptable experience that does not require past experience editing files. This is how I started to think about writing a text editor ways smaller than Nano itself. Just for fun, basically, because I like and admire small programs. How lame, useless, wasting of time is today writing an editor? We are supposed to write shiny incredible projects, very cool, very complex, valuable stuff. But sometimes to make things without a clear purpose is refreshing. There were also memories... I remember my first experiences with the Commodore 16 in-ROM assembler, and all the home computers and BASIC interpreters I used later in my child life. An editor is a fundamental connection between the human and the machine. It allows the human to write something that the computer can interpret. The blinking of a square prompt is something that many of us will never forget. Well, all nice, but my time was very limited. A few hours across two weekends with programmed family activities and meat to prepare for friends in long barbecue se