this post was submitted on 12 Jun 2025
21 points (95.7% liked)

Linux

7917 readers
595 users here now

A community for everything relating to the GNU/Linux operating system

Also check out:

Original icon base courtesy of lewing@isc.tamu.edu and The GIMP

founded 2 years ago
MODERATORS
 

The following gif demonstrates folding:

top 27 comments
sorted by: hot top controversial new old
[–] HayadSont@discuss.online 1 points 15 hours ago

UPDATE: For posterity's sake, I'd like to reflect on the last couple of days.

First of all, I'd like to thank everyone that has contributed to the discussion! Were it not for your recommendations/suggestions/endorsements, then I might not have found a valid alternative.

Secondly, I've taken every single recommendation pretty seriously. As such, I've either installed them to see for myself if I was able to reproduce the functionality found in the gif found above. Or, didn't install them to begin with due to the suggested installation methods not passing through my (rather) strict policy on software. Regardless, in the end, I've only found two pieces of software that satisfied the bill: Kate and KDevelop.

KDevelop is pretty cool, but is more of an IDE rather than a text editor. As such, I've landed on Kate.

But, perhaps more than anything, I've come to really appreciate Emacs (and Neovim). And, perhaps more than ever, I feel ready to take them on πŸ’ͺ. Wish me luck 😊.

[–] who@feddit.org 9 points 3 days ago (1 children)
[–] HayadSont@discuss.online 1 points 3 days ago (1 children)

Kate has been cool so far. Thank you for (yet) another endorsement!

However, I've been hearing conflicting narratives on Geany's folding capabilities. I've yet to test it out (as there's a long list I have to go over), but would you like to chime in with your thoughts on this matter? To be more precise, I desire to fold (at least) Markdown headings with it (as seen in the gif). Thanks in advance!

[–] who@feddit.org 2 points 3 days ago (1 children)

Sorry, but I don't know how Geany does with folding markdown, since I don't use that feature.

[–] HayadSont@discuss.online 1 points 1 day ago

No problem, fam.

I have tried to reproduce it in Geany, but have failed so far πŸ˜…. Perhaps it's on me, but I'm (at least) inclined to look elsewhere until this has been resolved. Hopefully it's on me and someone can point me in the right direction.

Anyhow, thank you anyways!

[–] recursive_recursion@lemmy.ca 10 points 3 days ago (1 children)

If I recall correctly KDE's Kate has folding and isn't Electron-based (Qt-based?)

[–] HayadSont@discuss.online 2 points 3 days ago

Thanks for another endorsement of Kate!

By the recommendation of others, I've actually installed and tried out Kate in the mean time.

So far, so good. πŸ™‚

[–] davidagain@lemmy.world 4 points 3 days ago (2 children)

The zed editor has code folding and it written from the ground up in Rust. I don't use it myself, but rumour has it that it's really fast.

[–] HayadSont@discuss.online 2 points 2 days ago (1 children)

I've also heard great things about it. Thanks for your endorsement! Unfortunately, correctly installing Zed on my distro might be more trouble than worth it at the moment. Hopefully the issue(s) will be resolved (very) soon. I would love to test it out and see it for myself.

[–] davidagain@lemmy.world 1 points 2 days ago (1 children)

I'm on windows so it's very not yet for me at the moment!

[–] HayadSont@discuss.online 2 points 1 day ago

Oh lol 😜 πŸ˜‚. Regardless, your input has been much appreciated! Thank you 😊!

[–] bluemoon@piefed.social 5 points 3 days ago (1 children)

rumor has it can run the kessel run in under 12 parsecs

[–] davidagain@lemmy.world 1 points 2 days ago (1 children)

a pump & dump with telemetry isn’t it

I don't think so, given who's developing it.

[–] bluemoon@piefed.social 2 points 1 day ago* (last edited 1 day ago)

who is that?
edit: looking through these https://zed.dev/team
okay.

[–] littleomid@feddit.org 6 points 3 days ago (2 children)

My brother Emacs is literally king for this. Check out org mode as well.

[–] HayadSont@discuss.online 3 points 3 days ago

I am starting to attest this. I've tested a couple of text editors since yesterday and -surprisingly- only Kate (and KDevelop) have (so far) been able to pull this off.

[–] bluemoon@piefed.social 3 points 3 days ago (2 children)

obligatory DOOM-Emacs mention

[–] HayadSont@discuss.online 1 points 1 day ago

Yup, Doom Emacs is definitely pretty lit. If it wasn't clear already, the gif in the post has been made with it.

FWIW, I actually started using Emacs through Spacemacs. And, honestly, I don't know if either one of the two has technical merit over the other. However, at some point, when I was working with (slightly) larger files, I just clearly started to notice input lag. Mind you, my laptop is starting to show his age, but input lag isn't something I was used to experience otherwise. As such, out of frustration, I pivoted to Doom and the rest has been history πŸ˜….

[–] littleomid@feddit.org 3 points 3 days ago* (last edited 3 days ago) (1 children)
[–] HayadSont@discuss.online 2 points 1 day ago

So do I, btw. 😜

[–] refalo@programming.dev 3 points 3 days ago (1 children)
[–] HayadSont@discuss.online 1 points 2 days ago

Thanks for mentioning an editor I would otherwise have missed!

Uhmmm..., I just installed it. First impressions were pretty good. For some reason, I assumed it would work as well as Kate (and Kdevelop) have. However, I wasn't able to replicate the folding functionality within the Markdown file.

Would you happen to know what I'm doing wrong? Your help is much appreciated!

[–] Kissaki@programming.dev 2 points 3 days ago (1 children)

That visual pattern compression though

[–] HayadSont@discuss.online 1 points 2 days ago (1 children)

Very interesting. I suppose that's an artifact of the ffmpeg hacking used to convert the screencast to a gif. Would you happen to know what I could do to prevent that from happening in the future?

Btw, FWIW, I seem to only notice this myself when I'm on the phone. Does the picture above also happen to be from your phone?

[–] Kissaki@programming.dev 2 points 1 day ago (1 children)

The screenshot is from my desktop with wide enough screen on Lemmy web (programming.dev).

The issue is one of scaling.

When I open the image without being resized into the website layout, it has the following visual pattern:

When I zoom out to 50% it looks (almost?) fine

Did you scale the source with ffmpeg? Do you have a visual pattern in your console background? The simplest solution would be to have a solid color as background. The second best to render a small enough size that it does not get resized in the browser.

At 1920x1038, it's very big right now. I'm surprised the font is big enough to be readable. I assume you scaled it up or have a high dpi display resulting in this.

[–] HayadSont@discuss.online 1 points 18 hours ago* (last edited 18 hours ago) (1 children)

Thank you so much for this! Hopefully I'm not bothering you with this*.

Did you scale the source with ffmpeg?

I'm not entirely sure, but I don't think I did. The invoked command was the following:

❯ ffmpeg -i input.mp4 output.gif

Do you have a visual pattern in your console background?

I don't think I do. It doesn't look like it at least. To be clear, even on my laptop I notice the visual pattern visible in the gif. But that's totally absent when I'm working within Emacs. Or at least, it looks as if it's just a singular solid color.

The second best to render a small enough size that it does not get resized in the browser.

Hmm..., makes sense. Not a huge fan, though πŸ˜…. Hopefully I can solve it through other means instead.

I assume you scaled it up

Yup. For the sake of readability*. But the upscaling (or rather zooming in*) was done natively within Emacs.


Alright, so I went to do some digging and the pattern only starts to show up in the gif. Perhaps as a result of the smaller color palette*. Regardless, I tried to see if it is solved by simply generating a 'better' palette and using it as a filter of sorts. Furthermore, in case that wasn't enough, I also tried playing with different dither algorithms:


Does any one of the above gifs do better?

[–] Kissaki@programming.dev 1 points 3 hours ago* (last edited 3 hours ago)

1, 2, 4, 5, 6 all look fine resized in the post and full size

3 looks fine full size but has slight visual artifacts resized in the post (check/square pattern)

I can barely see it on my monitor. So on worse monitors it may not even be visible. #272a31 vs #262b31

animated webp may also be an option