![]() But, these days some tasks are better suited for mouse. When it comes to keyboard-only mode, vi and emacs are kings. Of course, vi does have some antiquated concepts, hardly suited for modern times. However, having finally learned the vi language, for a language of button presses it is, I can finally do really complicated edits really fast. Yes, modal editors are clunkier to learn, just like the command line. ![]() More specifically, what would happen is, because of Keyboard::keys not being initialized yet, for all the Hotkeys, hotkey.state->sequence would be set, but hotkey.state->keys would not be breaking Keyboard::poll seen below As it turns out, the issue was an initialization race condition in hiro where both the Hotkeys and pKeyboard were apparently being initialized before Keyboard::keys which was breaking everything and resulting in every hotkey reading as being pressed on the first keyboard poll, including the quit hotkey, closing the program immediately. The much bigger issue that took me ages to figure out was why the program was then always closing immediately. Oh, and I had to copy those two bml files from data to next to the executable, of course. The only real issue compiling was I had to remove -static from the windows stuff in nall/GNUmakefile because there weren't static libs for GTK (although the error the linker spits out for this makes it look like it couldn't find any libs, even though the dynamic ones are right where it's already looking, which is dumb and took a litle bit of figuring out what it was really complaining about). Setting up msys2 to get windows versions of gtk and then compiling it turned out not to be all that hard. I decided to be that guy and try this, as I have on many occasions before on hiro/gtk only projects of yours. Idea being, it's 500 lines, feel free to add any features you want yourself. I'm only planning to develop this to the extent I want to use it. If you can't run it, peeking at the source for issues would be helpful, too. My own testing shows it works fine, but I'm obviously a bit worried that if I missed something serious, it could mess up my source code or worse, which would be extremely bad. I'd appreciate if anyone able to run it could do some testing. But probably in the future I'll add more stuff. You can't (currently) do things like rescan folders in directory mode to find new/deleted files/folders, rename files, create/delete files/folders, spawn new documents with the editor already open, save an open file as a different filename (that creates too many gotchas like saving it as a different file that's already open in the editor), use the search function all that well in hex mode (strings that wrap on 16-byte boundaries will miss), do a find+replace, etc. No real features beyond save, save all, find (forward and backward search), and goto (line.) Has a safeguard against files being modified externally when you go to save changes, tells you if it can't save for some reason, detects read-only files, and has a snazzy close dialog to choose which still-modified files you want to save or not. The editor itself has a text mode and a simple hex mode (currently read-only though, hiro::He圎dit needs more work.) The default mimetypes.bml file is missing a huge amount of extensions, but I'll get to them in time.Īmethyst filename - open an existing document with no tree viewĪmethyst directory - open a folder and allow recursive access to all subfiles/subfolders You must run "make install" for now, since I don't have a fallback for missing config files yet. GTK only (so Linux and BSD, or if you're adventurous enough. It's like VS code, Sublime, or Atom I guess, if any of those programs were written in ~500 lines of code and ran natively on FreeBSD. I wrote a text editor, for various reasons.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |