Over the past months I've been creating a #MicroEmacs look-alike called kg, clearly flirting with Mg, and today I've released v1.0.0! 🎉 Pick it up at https://github.com/troglobit/kg

I'm curious to hear what people think, there's a pre-built .deb file for users of #Debian #Ubuntu #LinuxMint, and yes for all the #Arch people there's a PKGBUILD file contributed early on by @bodil 😊

#emacs #terminal #console #embedded #linux

GitHub - troglobit/kg: Light Weight UTF-8 Text Editor

Light Weight UTF-8 Text Editor. Contribute to troglobit/kg development by creating an account on GitHub.

GitHub

@troglobit wow this looks deeply impressive and useful. the large feature set despite zero dependencies -- very nice.

interesting that it uses a line-based data-structure for the buffer. like vi(m), afaik.

i recently studied relaxed radix balanced trees as efficient (immutable) data-structure. 'ewig' is an extremely performant text editor based on it. i guess for kg it's too late to change this fundamental structure but you might find interesting at least. the original data structure has been developed by rich hickey for clojure but it has been presented at several conferences by ewig-author juan pedro bolivar puente, e.g. at https://www.youtube.com/watch?v=sPhpelUfu8Q

CppCon 2017: Juan Pedro Bolivar Puente “Postmodern immutable data structures”

YouTube
@troglobit how much of the code did you vibe code?
@mekeor I'm not hiding anything, it all "vibe coded" and reviewed by me.

@troglobit i didn't ask if you're hiding but thanks for bringing it up: of course you are hiding.

if it's vibe coded please state so prominently, within the first paragraphs of the readme!

note that i'm not shaming you to use llms but i do shame you for not making it very very clear right in the fucking beginning, wtf man!

@mekeor Happy to get feedback, obviously I don't agree, but I'm happy with the engagement thank you!
@troglobit I saw it the other day. Compiled it now. When I start it, and hit `q` it just quits. So one can't complain about it being hard to exit... But this is apparently intentional, I'm not supposed to type in the special buffer?
@quite wow, nice catch dude! This is obviously not the way it's supposed to work 😆 thanks for the report, I'll push out a v1.0.1 release immediately!
@troglobit It's not? However odd it seems, both in the man page, and in a comment in kbd.c, I read what seems like the intention is that `q` should closes the "special buffer". And the location of that `c == 'q'` is very prominent. Now I become suspicious.
@quite opening the editor and pressing the 'q' key should obviously not cause the editor to exit. I'm sorry for your experience, but I'm grateful for your report.
@troglobit Hm allrite. But 'q' should still close a *scratch* buffer (if it's not the sole buffer). Never came across this kind of behaviour before, but I'm probably ignorant :) It's like nudging the user to not use these special buffers?

@quite you found a neat corner case, the default one, we shouldn't close the editor when the *scratch* buffer is the only buffer.

Should be fixed in v1.0.1 https://github.com/troglobit/kg/releases/tag/v1.0.1

Release kg v1.0.1 · troglobit/kg

Bug Fixes Fix q quitting the editor when typed in a lone *scratch* buffer; q now only closes special buffers when another buffer is available

GitHub
@troglobit ok, i'm still a bit confused why 'q' is (mostly) forbidden i special buffers, oh well

@quite Not forbidden, just a key to dismiss the buffer, like escape or "back" or whatever you came from.

Sorry, early days for this little project. Thank you for taking the time to test it out!