Comment by π skyjake
Re: "Sorry if this has come up before... I'm confused about howβ¦"
@flipperzero I was quoting the OP (2nd line). (EDIT: clarified the quote)
As to your question, the proper way to write gemtext is with soft wrapping enabled. The command line option --softwrap enables it in Nano, and I believe there is a key shortcut for it (maybe M-$).
Apr 26 Β· 11 days ago
13 Later Comments β
π stack Β· Apr 26 at 19:53:
From the spec:
Gemini users MUST use vim. Gemini users MAY NOT edit gemtext with other text editors.
π gritty Β· Apr 26 at 23:49:
lol @stack
𦦠ainent · Apr 27 at 03:56:
@stack
other text editors
This hallucination makes me suspect youβre an LLM. π
π flipperzero Β· Apr 27 at 07:51:
From the spec:
Hmmm... seems legit to me!
Since I'll be taking this *plunge*, surely I'd feel obligated to give credit where credit due with supreme leader solderpu-umm, wait a minute...
β [fig. 1 - project gem docs] (pictured: no matches)
Huh.. W-well, I'm sure I can find some better info on this! Let me just go ahead and run a search to get a better ide-eh? *GASP* UH.. Ohh... no...
β (https) sentinelone - "Vim Text Editor RCE Vulnerability"
β [fig. 2 - RCE report] (pictured: cve-2026-33412 reactions)
yeeeaaa... I think I'm good... <_<
π lars_the_bear [OP] Β· Apr 27 at 09:50:
Thanks to all who responded, but I remain confused... I guess if you're entering Gemtext using a regular text editor, you almost have to put extra spaces between each line/paragraph, just so you can manage your own work. But it's still "wrong", from a specification perspective, as the extra spacing is superfluous.
But if you don't add it, clients that don't add space to paragraphs -- relying on the authorial extra spacing -- just show a wall of text, when authors have done it "right".
I'm writing a utility that outputs Gemtext, and I'm wondering whether it ought to add this "conventional" whitespace, as everybody else seems to.
π skyjake [mod...] Β· Apr 27 at 11:07:
@lars_the_bear If you're thinking of Gemtext as a purely semantic description of the document's structure (each text line being a paragraph, etc.), that doesn't align with the reality of how it's used. When it comes to empty lines and LF characters in general, Gemtext absolutely mixes some presentation rules in there. In addition to paragraph spacing, people put padding around heading lines, too, for readability.
There are valid cases when you don't want to automatically insert any space between consecutive text lines, for example:
1. First option.
2. Second option.
3. Third option.
The intended use of Gemtext is to exactly present the line breaks as in the source, keeping empty lines as is.
π lars_the_bear [OP] Β· Apr 27 at 15:26:
@skyjake : Sure, I get that. The problem is that clients have to put some space between paragraphs/lines anyway, because authors might not add any. When authors add vertical space as well, the result is a certain amount of extra spacing.
It's not the end of the world, but I'm fussy about things like that.
I suspect that clients have kind-of adjusted to the fact that almost everybody puts in extra space, and have minimized (or perhaps adjusted) the amount of implicited spacing they add themselves. Dunno -- perhaps I'm ust over-thinking it.
π skyjake [mod...] Β· Apr 27 at 17:09:
clients have to put some space between paragraphs/lines anyway
No they don't, as I've been trying to explain in my previous comment(s). What makes you think that?
π lars_the_bear [OP] Β· Apr 28 at 07:56:
@skyjake : no, you're right -- clients don't _have_ to space paragraphs and (IIUC) neither Lagrange nor Alhena does. At least, the versions I'm using don't. So if you write Gemtext without additional spacing, it's almost unreadable.
Look at the two snippets of Dickens below:
β With no additional spacing
On my machine, the first version is more-or-less unreadable -- just a wall of unbroken text. The second version is more manageable.
My understanding of the Gemtext specification is that each line is a paragraph, and should be rendered as such, with spacing or indents or something.
π flipperzero Β· Apr 28 at 08:14:
@lars_the_bear I see where you're coming from, catching on to the rationale related to what's involved for the spacing you bring up. Along that is why I also appreciate the chosen capability @skyjake conveys to do with what clients do or don't perform, if in case I can help clear things up a bit between how the two ideas correlate.
Just like how you elaborate lars, yes client's don't -have- to space paragraphs In that same logic flow jake presents, in regards to what clients 'have' to do or not related to any presumed obligation. Rather, to lars' credit, the idea is that the decision whether or not that spacing is automated is -left up to- the client to add margins (or not).
π lars_the_bear [OP] Β· Apr 28 at 10:18:
@flipperzero : "...whether or not that spacing is automated is -left up to- the client to add margins (or not)."
Well, yes; I think the specification is simply not clear enough here. It doesn't actually use the word "paragraph". Instead it says:
Each individual lines[sic] in a Gemtext document is a stand-alone entity.
I'm interpreting "entity" as "paragraph" because it seemed natural to do so. But there's nothing to compel a client to behave this way.
Thus authors are more-or-less compelled to insert additional spacing, because they can't assume that clients will.
Sigh. The more I use Gemtext, the less I like it.
π skyjake [mod...] Β· Apr 28 at 14:12:
Thus authors are more-or-less compelled to insert additional spacing, because they can't assume that clients will.
That is basically it, yes. It's part and parcel of the compromises being made that favor easy implementability of a Gemtext parser and renderer. A client does not and should not need to worry about sophisticated text layout to be able to present Gemtext.
π lars_the_bear [OP] Β· Apr 28 at 14:42:
@skyjake : "A client does not and should not need to worry about sophisticated text layout to be able to present Gemtext."
There's nothing sophisticated about putting a bit of space after a paragraph. All that would have been needed was for the specification to say "clients should/should not treat text lines as paragraphs". That's it. Then everybody would know how to write, and clients would know how to behave.
Now we have a situation where most writers space their lines, but some don't, and clients can't render both adequately.
Original Post
Sorry if this has come up before... I'm confused about how use vertical spacing in Gemtext. In theory, there should be no need for any additional vertical space except in pre-formatted blocks, because Gemtext is line-based. If you write each paragraph on its own line, the client should be able to apply reasonable spacing to make it readable. And yet... many writers do insert additional blank lines, particularly below headings (Bubble does). If a client gives full weight to this extra spacing --β¦