||2 years ago|
|.gitignore||2 years ago|
|LICENSE||2 years ago|
|Makefile||2 years ago|
|README.md||2 years ago|
|config.h||2 years ago|
|hermes.1||2 years ago|
|hermes.c||2 years ago|
|syntaxhl.h||2 years ago|
Hermes is a a small text editor (~40k compiled), and is a fork of kilo by antirez. Hermes takes kilo and modifies the control mechanisms to give a stripped down/lo-fi vi-like experience. This is still a big work in progress but is semi-usable.
You will need a C compiler. I believe all of the headers are pretty standard and should be present. I have built this on Debian and on OSX and did not need to install any additional headers/tooling.
config.h allows for configuring a few items: width of tabs, how many times to verify quitting without saving, whether or not to use the alternate terminal screen/buffer, and configuring the colors.
Additionally, the file
syntaxhl.h controls the syntax highlighting for programming languages. The format is pretty clear in the file so it should be easy enough to add basic support for languages that I have not provided.
Both files are commented and should be easily configurable.
Things are buggy as I work through them, but it should be a usable experience. That said, there is no undo buffer... which is rough. The paste buffer is mostly working, so some things can be undone by pasting after deleting. Visual mode is woring... sort of: multiline selections work for deleting, but have issues adding the deleted content (or yanked content as the case may be) to the paste buffer.
I think the editor in its current state will work fine for its intended purpose: writing gopher phlogs on colorfield.space
Anything much heavier than that might be problematic. It works pretty well as a file viewer as well though and the code highlighting helps.
I mostly started working on this because my server community needs a more complete text editor than chalk and I still want to keep most of the userspace limited to programs that users, myself included, made or contributed to. This is my first time writing any decent amount of C code, so has also worked out as a good project to introduce me to more C. I am convinced that the C that I have added to this project is maybe the ugliest code I have ever written, lol. But everyone has to start somewhere, right? Rather than just start with a full version of Kilo, I used this tutorial to get me started and typed every character by hand. I left out some features and added some of my own in the process.
- Pasting in from the system clipboard works, but things get kind of weird and unpredictable. Particularly for long lines.
- In general really long lines have some issues
- VisualMode is buggy and cannot yank multiline selections (but can delete them)
- Numerical multipliers work (ie.
10dwwould delete the next ten words), but there are issues dealing with the paste buffer and only the last deleted item will be added to the buffer, rather than the whole group of them
- Will not create a file when passed a filepath that does not exist. Instead, call without arguments and then save the file as whatever you want
- Only supports ascii, NO UNICODE support whatsoever
Try things out to see what works. Save often when you know things are in a good state.
This project uses the same license as kilo (BSD 2-clause). If you modify or distribute it please be sure to do so with the included LICENSE file which credits antirez for kilo and myself for the modifications I have made, and describes the terms of the license.