- C 97.5%
- Makefile 2.5%
| art | I have to make a copy :( | |
| .gitignore | initial mly src | |
| LICENSE | tab/space conversion, license | |
| Makefile | create a literal 'binary image' of mly. | |
| mly.c | home addressing | |
| readme.md | more readme stuff | |
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 withsetpath [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/nullto quickly save multiple new files. -
mouse- enable moused mode (why...) -
quit -
execis only available if compiled in. Executes with whatever you specified. (e.g.exec touch ./grassbecomestouch ./grass)
Unimplemented as of 0.0.5:
lint [path]- did not have enough lines to implement fullyhelp- 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.