@movq@www.uninformativ.de Thatās cool! I also like the name of your library. :-) I assume you made the thing load quickly, didnāt you?
@prologic@twtxt.net No, thatās Python/curses on Linux. š
@movq@www.uninformativ.de Is this on yout little toy OS? š¤
Well, you girls and guys are making cool things, and I have some progress to show as well. š
https://movq.de/v/c0408a80b1/movwin.mp4
Scrolling widgets appears to work now. This is (mostly) Unicode-aware: Note how emojis like āš ā are double-width ācharactersā and the widget system knows this. It doesnāt try to place a āš ā in a location where thereās only one cell available.
Same goes for that weird āƤā thingie, which is actually āaā followed by U+0308 (a combining diacritic). Python itself thinks of this as two ācharactersā, but they only occupy one cell on the screen. (Assuming your terminal supports this ā¦)
This library does the heavy Unicode lifting: https://github.com/jquast/wcwidth (Take a look at its implementation to learn how horrible Unicode and human languages are.)
The program itself looks like this, itās a proper widget hierarchy:
https://movq.de/v/1d155106e2/s.png
(There is no input handling yet, hence some things are hardwired for the moment.)
I just fixed another bug in tt where the language hint in multiline markdown code blocks had not been stripped before rendering. It just looked like it was part of the actual code, which was ugly. I now throw it away. Actually, itās already extracted into the data model for possible future syntax highlighting.
Phew, it was just a one-time thing. Ta! :-)
Btw, @shinyoukai@neko.laidback.moe, thatās a super cool logo on your yarnd. I like it a lot!
It just doesnāt look aligned properly: https://lyse.isobeef.org/tmp/misalignment.png Could be a yarnd issue, though, it might not expect a logo this large. Just wildguessing, no idea.
@shinyoukai@neko.laidback.moe Because you might not want to commit all changed files in a single commit. I very often make use of this and create several commits. In fact, I like to git add --patch to interactively select which parts of a file go in the next commit. This happens most likely when refactoring during a feature implementation or bug fix. I couldnāt live without that anymore. :-)
If you have a much more organized way of working where this does not come up, you can just git commit --all to include all changed files in the next commit without git adding them first. But new files still have to be git added manually once.
@shinyoukai@neko.laidback.moe Do we now need ad filters in twtxt clients, too? O_o I hope not! Personally, I cannot stand the āSent with my crappy $phone/$appā e-mail footers.
But congrats on your client. :-)
os.UserConfigDir() up until a few seconds ago! I always implemented that myself.
@shinyoukai@neko.laidback.moe Yeah, they donāt truly support XDG. In fact, I looked in the Go stdlib source code to notice all the differences and shortcomings.
$HOME is not specified it tries to resolve the user's home directory by user.Current().HomeDir. Maybe that's overkill, I have to check the XDG spec.
Ok, the standard library implementation is wonky at best, at least in regards to XDG, because it really doesnāt implement it properly. https://github.com/golang/go/issues/62382 I stick to my own code then. It doesnāt properly support anything else than Linux or Unixes that use XDG, but personally, I donāt care about them anyway. And the cross-platform situation is a giant mess. Unsurprisingly.
os.UserConfigDir() up until a few seconds ago! I always implemented that myself.
Hmm, mine also resolves a leading tilde in these variables. And if $HOME is not specified it tries to resolve the userās home directory by user.Current().HomeDir. Maybe thatās overkill, I have to check the XDG spec.
But Iām definitely missing os.UserDataDir(). Thatās a bummer.
@shinyoukai@neko.laidback.moe Cool, I didnāt know about os.UserConfigDir() up until a few seconds ago! I always implemented that myself.
@movq@www.uninformativ.de Thanks! Iāll have a look at SnipMate. Currently, Iām (mis)using the abbreviation mechanism to expand a code snippet inplace, e.g.
autocmd FileType go inoreab <buffer> testfunc func Test(t *testing.T) {<CR>}<ESC>k0wwi
or this monstrosity:
autocmd FileType go inoreab <buffer> tabletest for _, tt := range []struct {<CR> name string<CR><CR><BS>}{<CR> {<CR> name: "",<CR><BS>},<CR><BS>} {<CR> t.Run(tt.name, func(t *testing.T) {<CR><CR>})<CR><BS>}<ESC>9ki<TAB>
But this of course has the disadvantage that I still have to remove the last space or tab to trigger the expansion by hand again. Itās a bit annoying, but better than typing it out by hand.
Oh, suddenly Mother Hulda dumped a centimeter of snow tonight! https://lyse.isobeef.org/schnee-2025-12-30/01.jpg
Magpie from the day before yesterday: https://lyse.isobeef.org/elster-2025-12-28/
@lyse@lyse.isobeef.org Well, I used SnipMate years ago (until 2012). IIRC, itās more than just āinsert a bit of text hereā, it can also jump to the correct next location(s) and stuff like that. Donāt remember why I stopped using it.
Then I used nothing for a long time. Just before Christmas, I made my own plugin (⦠of course ā¦), which does everything I need at the moment (and nothing more).
It can insert simple templates and then jump to the next location:
https://movq.de/v/67cdf7c827/sisni%2Dpython.mp4
And replace a string after insertion:
https://movq.de/v/67cdf7c827/sisni%2Dheader.mp4
(Itās not public (yet?) and it also uses vim9script, so I guess it wouldnāt work on your system.)
Question to my fellow Vimers: Which snippet insertion mechanism are you using or can you (not) recommend?