ce.mirror
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:
- For C projects, I use the venerable cscope, which is available in every Linux distro.
- For Crystal and Ruby projects, I use my own cscope-like program,
crscope. You can find this in mycsuprepository.
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:
- the ability to name macros or save them in text form
- profiles (loadable macros in text form)
- mark rings (I have never used this feature)
- line numbers in the display
- frames (for multiple native windows)
- cscope support
- upper- and lower-case a region (I have never used this feature)
- incremental search (I have never used this feature)
- a few other little-used commands
Added Features
ce has a small set of features that aren't in my MicroEMACS variant:
- Support for EditorConfig.
- Commands for scrolling the other window.
- Command for displaying internal stats.
User Guide
Complete usage information can be found here.
ce.mirror
- 2
- 0
- 0
- 0
- 0
- 13 days ago
- January 29, 2026
GNU General Public License v3.0
Fri, 20 Mar 2026 21:50:37 GMT