Small text editor sizes

Recently we had a discussion entitled “Better Text Editor” and we talked about several editors that have some really positive characteristics.

For those looking for text editors with REALLY small amounts of initial memory consumption, my own admittedly quick and simple sampling method, I found that levee was easily the smallest screen editor that can run from a terminal; it’s a minimal vi-like editor. Nano came in second smallest; mini Emacs-like editor mg came in close in size to Nano; one of the small, fast ones mentioned, micro, also did well, but had an initial image size several orders of magnitude larger in initial memory consumption, though still “minimal” compared to any of the major full featured text editors. Joe and Jed also consumed less initial memory than micro, for what it’s worth in my quick test. For expediency I didn’t record actual numbers, but I vaguely recall levee consuming about 2900 based on looking at ps aux for reading my .bashrc. All the others except micro were between 5000-10000, micro was just over 100000.

How much memory each process uses will greatly depend on your specific system, hardware and configuration, so these measurements are only good as relative numbers.

That said, ed, the standard text editor, is significantly lighter than the text editors mentioned in the OP. On my system, it uses less than 1/10 of RAM used by nano.

You could go even lighter if you used sed to edit text files (which is entirely possible), though this is perhaps pushing the definition of a text editor a bit, since it’s not interactive. EDIT: actually no, ed is lighter. And I’m using GNU ed from the repos, which is one the most bloated versions of ed out there.

Reran my unofficial test; some of the editors consumed a bit more virtual memory than they did the first time around, but were still pretty frugal.

You will definitely be surprised: levee held #1 smallest by a good margin:

  1. levee: 2936, 2) ed 5436, 3) mg 5944, 4) nano 7732, 5) jmacs/joe 10,244, 6) xjed 22,152

So ed was NOT 1/10 of the others, plus though it’s simple, levee is much easier to look at several lines of text without having to repeatedly specify a line or group of lines to even examine. If you prefer Emacs-like key bindings, though it consumes a bit more than levee, mg does great @ 5944, about ~1700-1800 less than nano.

So when functionality is taken into account, if you want a very light, yet functional editor, levee and mg are great choices, and nano is pretty good too, especially when it’s easy to rebind keys in nano. However, ALL of these editors are quite light and efficient, so whatever people prefer, we’re talking about a difference of 20,000 bytes from the smallest to the “largest” image size for these fast, simple editors! Pretty good when a LOT of the big ones start running at a couple hundred MB (or more)!

A bit offtopic, but if someone is interested in a small and really fast GUI editor, then adie is a nice one. It is part of package fox, which is in the official repos.

1 Like

I accept your comment as within the confines of what I was attempting to write about. Ed, small and limited as it is, does NOT have the smallest editor footprint. Apparently the libraries from which it is built consume MORE resources than at least a few of the editors I was looking at.

I’d be happy to take a look at adie. I’ve not used it before, and I am a text editing fan who enjoys trying out and comparing a variety of editors. I’ll see if I can get it on some other distros too; thanks!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.