
Semantic Linefeeds (2012) - Tomte
https://rhodesmill.org/brandon/2012/one-sentence-per-line/
======
saagarjha
Maybe I'm misunderstanding the point of this article, but I always put
linefeeds where they should logically be. If people would like to view it in a
certain way, it's always easy to put it through a text-processing program,
which will do a much better job on semantically separated content rather that
that which has had formatting hard-coded into it.

(Incidentally, this is also why I use tabs for indentation, since it's a lot
easier for tooling to relayout. But I'm not trying to start the holy war
here.)

~~~
WorldMaker
One way to look at the article is not everyone realizes that there isn't
anything stopping people in some whitespace ignoring places like Markdown (or
HTML or LaTeX etc) from writing prose more like poetry with linefeeds at
clause level and other visually interesting places rather than just at
paragraph level or at some technically simple compromise like 72-character
word wrapping.

Which is sort of the reverse inference from the one you are presuming. ("I
want to format this text, so I'll use tools" versus more in this case "I'm
using tools to format this text anyway, maybe I'll flow it like I want in its
raw source form to be what looks interesting / dynamic / poetic.")

------
emddudley
Previous discussion:
[https://news.ycombinator.com/item?id=4642395](https://news.ycombinator.com/item?id=4642395)

------
choeger
That is actually a remarkably good idea. Now if we only had a tool that could
cope with such a format and parse sentences and paragraphs out of it. When I
run my thesis through grammarly I had to remove all the superfluous line feeds
for it to correctly determine the actual sentence structure (which it did then
well enough for me to do this semi-automatically for 200 pages).

~~~
WorldMaker
There's the usual markdown/reST/et al approach of strip newlines unless they
are doubled up at a "paragraph" boundary.

When converting to/from Inform 7 where newlines are sometimes syntactically
important, but I want to version control it (and sometimes write/edit it) a
bit more "semantic newline", or at least "72-character wrapped", I have a tool
converting "hard" newlines to/from Pilcrows [0] (¶). Which I think look
reasonable in source document form and is an appropriate mark for the meaning
(denoting a new paragraph).

An example:
[https://github.com/WorldMaker/APrincessOfMoons/blob/master/_...](https://github.com/WorldMaker/APrincessOfMoons/blob/master/_musdex/Source/story.ni/earthdollars.i7x)

The bones of my converter:
[https://github.com/WorldMaker/APrincessOfMoons/blob/master/i...](https://github.com/WorldMaker/APrincessOfMoons/blob/master/i7stanza.py)

[0]
[https://en.wikipedia.org/wiki/Pilcrow](https://en.wikipedia.org/wiki/Pilcrow)

------
ivan_ah
I'm so happy I have a name for this concept now! I independently started using
the same approach while editing my books. It looks weird, I know, but being
able to move entire entire sentences using only line-oriented commands makes
it worth it.

A side-benefit benefit of this approach is that any sentence that is overly
verbose becomes apparent right away --- why is this line so long?? because
it's a bad run-on sentence!! Fixed.

Some related editor packages:

\- [https://github.com/Konfekt/vim-
sentencewrap](https://github.com/Konfekt/vim-sentencewrap)

\- [https://github.com/jlevy/atom-flowmark](https://github.com/jlevy/atom-
flowmark) (not exactly since only "prefers" semantic cuts, but not always)

------
TOGoS
I've done this for a long time, but that's because I'm extra fussy about
keeping diffs as small and focused (on the thing I actually intend to change)
as possible. It's the same reason I prefer always-use-curly-braces and
indenting multiline parameter lists a single indent (as opposed to lining them
up after the function name) in C++. And avoid reformatting for its own sake
when making chnges to things. It can be hard to convince others of the utility
of these practices, though. :P

------
ggchappell
Nice name. I do something along these lines in my LaTeX source; never thought
of it as a _thing_.

------
nycticorax
There's an xkcd about this:

[https://xkcd.com/1285/](https://xkcd.com/1285/)

