Discussion:
Formatting text and using the convention of putting 2 spaces after a period
David Woodfall
2018-08-06 10:40:01 UTC
Permalink
I've noticed that when I select a block of text (written English
prose, not code) and press gq to reformat it, vim will change some of
the spaces after a period into two spaces, as is the convention among
some typists.

Is this intended, and can it be changed?

Personally, I prefer to keep just one space after a period, but I
notice that it does happen consistently - sometimes it will change
the spaces and sometimes not.

--

quit When the quit statement is read, the bc processor
is terminated, regardless of where the quit state-
ment is found. For example, "if (0 == 1) quit"
will cause bc to terminate.
-- seen in the manpage for "bc". Note the "if" statement's logic

.--. oo
(____)//
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Erik Christiansen
2018-08-06 11:08:04 UTC
Permalink
Post by David Woodfall
I've noticed that when I select a block of text (written English
prose, not code) and press gq to reformat it, vim will change some of
the spaces after a period into two spaces, as is the convention among
some typists.
Is this intended, and can it be changed?
AFAICT it's an Americanism, judging by occurrence. It defeats simplistic
automated removal of erroneous double spaces between words.

To turn it off, I have:

set nojoinspaces " Only one space when joining lines.
Post by David Woodfall
Personally, I prefer to keep just one space after a period, but I
notice that it does happen consistently - sometimes it will change
the spaces and sometimes not.
Does your cpoptions include 'j'? If so, you'll only get one space after
'?' or '!'.

It's not a format taught here in Australia, at least not >50 years ago
when I was in primary school, and it's not found in the wild here since
either.

Erik
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
David Woodfall
2018-08-06 13:25:11 UTC
Permalink
On Monday 6 August 2018 21:08,
Post by Erik Christiansen
Post by David Woodfall
I've noticed that when I select a block of text (written English
prose, not code) and press gq to reformat it, vim will change some of
the spaces after a period into two spaces, as is the convention among
some typists.
Is this intended, and can it be changed?
AFAICT it's an Americanism, judging by occurrence. It defeats simplistic
automated removal of erroneous double spaces between words.
set nojoinspaces " Only one space when joining lines.
Added
Post by Erik Christiansen
Post by David Woodfall
Personally, I prefer to keep just one space after a period, but I
notice that it does happen consistently - sometimes it will change
the spaces and sometimes not.
Does your cpoptions include 'j'? If so, you'll only get one space after
'?' or '!'.
Added j
Post by Erik Christiansen
It's not a format taught here in Australia, at least not >50 years ago
when I was in primary school, and it's not found in the wild here since
either.
Thanks. I'll give those settings a shot.

--

Some people have told me they don't think a fat penguin really embodies the
grace of Linux, which just tells me they have never seen a angry penguin
charging at them in excess of 100mph. They'd be a lot more careful about what
they say if they had.
-- Linus Torvalds, announcing Linux v2.0

.--. oo
(____)//
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
John Little
2018-08-06 21:47:54 UTC
Permalink
... vim will change some of the spaces after a period into two spaces...
AFAICT it's an Americanism, judging by occurrence. It defeats simplistic
automated removal of erroneous double spaces between words.
My understanding is that in print typesetting, more space was often used after a sentence than between words (though it could get complicated, depending on the font, the space needed for justification, and the first letter of the following sentence). With typewriters, to mimic this, the practice of two spaces was adopted. So, for text to be rendered properly in a variable width font one space is best, but with a monospace font, aka a typewriter font, such as vim uses, some of us cling to two spaces.

Regards, John Little
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Tim Chase
2018-08-07 00:15:20 UTC
Permalink
Post by John Little
So, for text to be rendered properly in a variable width font one
space is best, but with a monospace font, aka a typewriter font,
such as vim uses, some of us cling to two spaces.
I still use two spaces in my source material particularly because I
can `:set cpo+=J` and Vim will be smart enough to navigate by
sentence even if I have intermediate punctuation that might otherwise
be considered terminal. E.g.

I saw Dr. Smith yesterday. She lives on Oak St. with her husband.

Using ")" and "(" will navigate by true sentences and the "is"/"as"
text-objects refer appropriately to the sentence, not getting tripped
up by the "Dr." and "St." With `cpo-=J`, navigating with ")" and "("
will land on [S]mith and [S]he, and "dis" will only delete a portion
of my sentence.

That said, I usually write in some form of markup (usually HTML but
sometimes Markdown or occasionally LaTeX) and then render them to
HTML or PDF output with whatever the renderer deems an appropriate
amount of inter-sentence spacing---an amount I don't really care
about as long as it looks reasonable. :-)

-tim
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
meine
2018-08-06 11:45:16 UTC
Permalink
Post by David Woodfall
I've noticed that when I select a block of text (written English
prose, not code) and press gq to reformat it, vim will change some of
the spaces after a period into two spaces, as is the convention among
some typists.
Is this intended, and can it be changed?
it could be to enhance formatting, eg. in Markdown. markdown uses two
spaces to force a new line, like <br> in html.

probably there is a way to change this setting, but I don't know it.

//meine
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Erik Christiansen
2018-08-07 03:53:45 UTC
Permalink
Post by Tim Chase
I still use two spaces in my source material particularly because I
can `:set cpo+=J` and Vim will be smart enough to navigate by
sentence even if I have intermediate punctuation that might otherwise
be considered terminal. E.g.
I saw Dr. Smith yesterday. She lives on Oak St. with her husband.
Ooh, that would be worth trying - if only I could train myself to insert
two spaces when typing text. After 2^16 trips around our star, that would
be serious finger reprogramming.

...
Post by Tim Chase
That said, I usually write in some form of markup (usually HTML but
sometimes Markdown or occasionally LaTeX) and then render them to
HTML or PDF output with whatever the renderer deems an appropriate
amount of inter-sentence spacing---an amount I don't really care
about as long as it looks reasonable. :-)
I'll have to find time to dig up an introductory text on minimal LaTeX,
sufficient to add bold / underlined larger-font headings to some Vim
output, in a consumer-friendly font. When I use LibreOffice for that, I
have to make subsequent edits in the GUI monstrosity or lose the
formatting. :-(
Post by Tim Chase
My understanding is that in print typesetting, more space was often
used after a sentence than between words (though it could get
complicated, depending on the font, the space needed for
justification, and the first letter of the following sentence).
That is rather interesting. IIRC, not a few early printed books mimicked
the oversized initial capital at the start of a page. That would need
extra space. More generally, if sentence-start double spacing were not
strictly adhered to after initial hand typesetting, the spare space
could serve as a buffer to allow insertion of a missed character earlier
in the line, without risk of wrapping several following lines in a
paragraph. (Laborious by hand.)

Erik
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...