1
2
Fork
You've already forked mly
0
A tiny, emacs-style editor with syntax highlighting written in 1000 lines of C.
  • C 97.5%
  • Makefile 2.5%
2026年07月08日 23:55:04 +10:00
art I have to make a copy :( 2026年07月05日 22:59:17 +10:00
.gitignore initial mly src 2026年07月04日 01:14:01 +10:00
LICENSE tab/space conversion, license 2026年07月04日 21:19:16 +10:00
Makefile create a literal 'binary image' of mly. 2026年07月05日 21:56:21 +10:00
mly.c home addressing 2026年07月08日 23:55:04 +10:00
readme.md more readme stuff 2026年07月05日 23:39:51 +10:00

7z mly binary

Image: A 7z archive representation of the mly 'micro' 0.0.5 binary! Copy it for yourself and convert it!

.mly

This is my opinionated, tiny, and work-in-progress text editor that sits at 1K lines of C. It's better than some editors, worse than others, but it gets the job done.

Fun fact: this README was written using .mly!

It sits at a whopping ~27K (make micro) in size and can do the following:

  • Command execution (if LET_ME_SHOOT_MY_OWN_FOOT == 1). The regular yapping about security and stuff goes here.

  • reading a new file without leaving the app via read [path], and redirection of where the buffer writes with setpath [path].

  • "mouse support" (for the brave)

  • automatically use bracketed paste if supported by your terminal. This is SIGNIFICANTLY FASTER, like thousands of lines instantly faster.

Don't worry, mly self-disables bracketed paste on quit.

  • Saving of files using regular shortcuts (ctrl-s).

  • navigation and editing using the home/del/end/pgup/pgdown keys. Also has Ctrl-F searching too.

  • Token-based syntax highlighting. (It's a real editor now!)

Due to size limitations, this is implemented for only a subset of C, so not all languages will be highlighted fully. It also uhh... doesn't know the difference between being a variable or keyword. It'll look funny depending on how you name stuff.

  • CMD mode, because I wanted a semi-EMACS experience without as much modifier spam. (more on this in the next heading)

Note: mly is currently dependent on being on a POSIX system (Mac/BSD/Linux) with ncurses. This can be addressed by changing a couple tiny things, but I don't have a windows machine anyways.

Command Mode

This displays "CMD" in your editor, and also serves as a second nag to SAVE YOUR FILES before quitting.

Current commands as of 0.0.5:

  • read [path] - read any path. This includes things that aren't files, such as /dev/null.

  • setpath [path] - change the save path (not the working directory). useful for copying a text file, or rerouting /dev/null to quickly save multiple new files.

  • mouse - enable moused mode (why...)

  • quit

  • exec is only available if compiled in. Executes with whatever you specified. (e.g. exec touch ./grass becomes touch ./grass)

Unimplemented as of 0.0.5:

  • lint [path] - did not have enough lines to implement fully
  • help - Same story.

Compilation

This can be compiled (for actual use) in Make using make release.

To compile and run the dev version, use regular make

Installation

The binary in ./build/bin/mly will be copied to /usr/mly when using make install.

Development Notes

While mly is stable for the most part, there may be some bugs here and there. I haven't personally had any real issues yet, though.

mouse mode is pretty unintuitive, and only really exists as a proof-of-concept. This is kinda due to problems with ncurses.

Any issues, feedback, or uhh... contributions... would be awesome! Please just note that human suffering is a major point of the editor, so LLM code is discouraged.

mly is probably going to become a more 'regular' editor in the future, with this becoming something like micromly.