4 ms·
You could write a script which replaces the end of sentences with a new line and use git hooks[0] to run it before every commit. You wouldn't have to write any
by TheFreim 4y ago
You could write a script which replaces the end of sentences with a new line and use git hooks[0] to run it before every commit. You wouldn't have to write any differently.
0. https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks
- michaelmior 4y agoThis would require accurately detecting the end of the sentence which is not an easy thing to do correctly consistently.
- deleted 4y ago[deleted]
- dubya 4y agoTwo spaces between sentences makes this easy, and should be just as easy a habit as one sentence per line.
- kadoban 4y agoThat's about as unnatural for most people as newline per sentence, and has the added risk that you'll accidentally publish like that and it'll look weird. One per line would be _much_ harder to accidentally publish because it's more obvious.
- BeFlatXIII 4y agoTwo spaces between sentences is how I've always typed them, even if it's in HTML or MD or other forms that will condense them into a single space in the final render. The two spaces mark a clear intent to end a sentence instead of a period to punctuate an abbreviation.
- TheFreim 4y agoMany people learned to add two spaces to the end of each sentence which is now built in to their muscle memory. My father learned to type adding two spaces to the end of every sentence, they tried to teach that to me in computer class in middle school but since I had a lot of experience typing already without it I never felt motivated to change my habit to add two spaces. I never really saw the point, in most formats I can't see the two spaces.
- wongarsu 4y agoTwo spaces after each sentence comes from typewriters, where it supposedly looked better. On computers it made sense in the time of monospaced fonts, but with "modern" fonts being able to control the amount of space behind punctuation it's largely redundant.
- blowski 4y agoExcept for when you want to do diffs at the end of a sentence.
- avgcorrection 4y agoGood typography seems to dictate a wider space after a sentence than between words. So this is a typewriter habit to mimic that kind of thing (like the sibling noted).
- jhardy54 4y agoSome people might prefer two spaces, but my understanding is that all authorities on “good typography” have standardized on one space: https://practicaltypography.com/one-space-between-sentences.html https://practicaltypography.com/one-space-between-sentences....
- avgcorrection 4y agoInteresting. I definitely respect Butterick’s opinions on typography.
- avgcorrection 4y agoI used to write like that (even though I’m not an American or a former typewriter) but pressing double space got annoying after a while. :-)
- _tom_ 4y agoNo, but NLP toolkits like opennlp already do this quite well.
- michaelmior 4y agoFair point, but I still prefer the solution of just putting in a new line myself. Then I don't have to worry about maintaining such a script, setting up the git hook, etc.