Hacker News new | ask | show | jobs
by akavel 2233 days ago
If you are interested in small Lua-based text editors, I advise you to take a look at Textadept: https://foicica.com/textadept/ . Specifically as to minimalism: "Relentlessly optimized for speed and minimalism over the years, the editor consists of less than 2000 lines of C code and less than 4000 lines of Lua code." I believe this is a limit that the editor's author self-imposed and keeps to it with an impressive strictness.

edit: though it uses Scintilla for the "engine" and I would assume its LOC count is not counted towards this limit.

6 comments

You might also be interested in kilo: https://github.com/antirez/kilo
Or, for something really minimal, two kilo - https://github.com/moon-chilled/Two_Kilo/blob/master/two_kil...
I forked that to add support for Lua-based scripting, multiple buffers, etc. Fun exercise:

https://github.com/skx/kilua

Hunter x hunter reference?
No, it was just the obvious "kilo" to "ki-lua" transformation!
Textadept is great. It's my daily driver. That's mostly because I was looking for something lightweight that I could configure to operate similarly on windows and mac.
Text adept lacks a "folder view". if it were not for it. and "open folder".

For now, lite also lacks "open folder", but it shows tree view of current directory atleast

Textadept is also very extensible with little effort.
Also "zile"
texadept is great, it can handle really large files where most other editors crash/die.
Just tested that premise with a 300MB text file... Kate loaded it no problem in about 3secs... textadept didn't load the file, gave an error.

From textadepts FAQ:

Q: Why can’t Textadept handle HUGE files very well?

A: Textadept is an editor for programmers. It is unlikely a programmer would be editing a gigantic log file. There are other tools for that case.

I can't speak to the FAQ, I guess by 'gigantic' they mean tens of GBs. I use it for what i consider large files all the time, I just opened a 2GB file to check I am not going mad and it worked just fine. It took around 10 seconds to open so I agree it's not the quickest to start but at least it does. I'm running Textadept 10.7 on a decent Linux machine.