Live data from Hacker News

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

antirez.com

1–10 of 146 posts

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

#2
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

All the time, but I even use nano all the time on OS X for full on programming, mostly for quick edits or starting things off before I can be bothered opening a full project in Sublime. (Sure, I can 'get around' in vi, but I just don't seem to have the brain for it and nano is 90% fine. I grew up on GWBASIC so anything is an improvement ;-))

That aside, this feels like it could be a kinda cool command line level equivalent of ToDoMVC. Port this simple editor into Go, Rust, and a few similar languages - see what the differences are, etc.

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

#4

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 All the time, but I even use nano all the time on OS X for full on programming, mostly for quick edits or starting things off before I can be bothered opening a full project in Sublime. (Sure, I can 'get around' in vi, but I just don't seem to have the brain for it and nano is 90% fine. I…

Nice thing about Nano is that they arrow keys always seem to do what they are supposed to, no matter the system, shell, TTY, etc. Vi seems to have issues sometimes, and needs extra config

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

#5
post #4

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 All the time, but I even use nano all the time on OS X for full on programming, mostly for quick edits or starting things off before I can be bothered opening a full project in Sublime. (Sure, I can 'get around' in vi, but I just don't seem to have the brain for it and nano is 90% fine. I…

Nice thing about Nano is that they arrow keys always seem to do what they are supposed to, no matter the system, shell, TTY, etc. Vi seems to have issues sometimes, and needs extra config

I don't know about vi (I think it's still rare on Linux systems), but Vim typically does what is expected from it.

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

#6
post #4

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 All the time, but I even use nano all the time on OS X for full on programming, mostly for quick edits or starting things off before I can be bothered opening a full project in Sublime. (Sure, I can 'get around' in vi, but I just don't seem to have the brain for it and nano is 90% fine. I…

Nice thing about Nano is that they arrow keys always seem to do what they are supposed to, no matter the system, shell, TTY, etc. Vi seems to have issues sometimes, and needs extra config

Presumably h, j, k, l will always get you around in vi?

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

#9
post #6
post #4

Earlier quoted context omitted.

Nice thing about Nano is that they arrow keys always seem to do what they are supposed to, no matter the system, shell, TTY, etc. Vi seems to have issues sometimes, and needs extra config

Presumably h, j, k, l will always get you around in vi?

j and k behavior may vary depending on your config.

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

#10
Honestly, this is the most exciting and inspiring project I've seen on HN in years, by far. I love that it's a fully usable terminal-based text editor that has zero dependencies. Just perusing the source code has been extremely interesting and educational for me already, and it's only been 5 minutes. Definitely gonna bookmark this project and hack on it! The TODO list looks like a good start, especially the xterm-based feature.
Post reply on HN