ce - Crystal editor

ce
Login

ce

This is a curses-based editor written in Crystal that attempts to duplicate the functionality of my MicroEMACS variant. There is no good reason for me to create such a thing, since MicroEMACS is smaller, faster, and more portable. I'm doing it simply for my own amusement and education.

Important Note: I did not use AI to write CrystalEdit. I typed all of the code myself, and all of the mistakes and bugs are my own. Many of the comments, and most of the User Guide, were taken directly from MicroEMACS.

As of this writing (2026-03-04), ce implements enough MicroEMACS functionality to perform basic editing, including undo/redo, keyboard macros, and Ruby extensions. My hope is that the Crystal code will be easier to understand and modify than the C code in MicroEMACS.

ce has just over 8K lines of code, and a compiled code size of about 1.1 Mb for a --release build. This is much larger than the 110 Kb code size of MicroEMACS, and is likely due to the inclusion of the very large Crystal standard library. But it is still much smaller than editors in use by the Cool Kids these days. For example, the very popular zed has about 300 Mb of code. I've heard that VS Code is similarly huge, though I have not examined the binaries myself. Of course, these popular editors are much more feature-rich, but it is questionable whether they have 300 times more utility than ce, or 3000 times more utility than MicroEMACS.

For browsing and searching in large projects, I prefer to use separate tools designed for this purpose:

Installation

Build ce using this command:

make

Then copy the resulting binary file ce to some place in your PATH.

You can also make a "release" version of ce by using this command:

make ce.release

This instructs the compiler to use optimization level 3, which will greatly reduce code size, but compilation will be very slow. The resulting binary will be called ce.release, to distinguish it from the unoptimized ce.

ce requires no external shards (Crystal libraries). It does require the ncurses or ncursesw package for your Linux distro.

To make nicely formatted API documentation for the classes and methods in ce, use this command:

make docs

or this command:

crystal docs

To view the API documentation, use this command:

make viewdocs

or this command:

xdg-open docs/index.html

Missing Features

The following features from my MicroEMACS variant are missing in ce, but I may add them as needed:

Added Features

ce has a small set of features that aren't in my MicroEMACS variant:

User Guide

Complete usage information can be found here.