TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Why I Two-Space

77 点作者 dcope超过 12 年前

37 条评论

debacle超过 12 年前
This is quote possibly the most beautiful blog I have ever seen.<p>That said, it's a stupid argument. If you want to two-space, fine, but be aware that most people believe and understand you're living in the typographic stone age alongside people who indent their paragraphs and use Whitesmiths.<p>Two-spacing is a result of monospace typewriters, which couldn't provide the "space and a half" spacing that traditional typesetting put between sentences, however these days most of the people I see doing two-spacing are in their forties or older, and probably used a typewriter before they used a computer.<p>Even when using a monospace font, I prefer single spacing. Why? It's easier to be consistent. If I forget to two space, or have a typo and miss a two-space, short of creating a really nasty regex I'm not going to be able to find it.
评论 #4645633 未加载
评论 #4645456 未加载
评论 #4645630 未加载
评论 #4645733 未加载
评论 #4645514 未加载
评论 #4645447 未加载
评论 #4645403 未加载
评论 #4645301 未加载
评论 #4645900 未加载
jedbrown超过 12 年前
When editing text source, I press return after every sentence. It doesn't affect the compiled product and makes diffs much easier to read. The alternatives seem to be (a) longlines-mode or similar with one very long line for the whole paragraph or (b) fill-paragraph with text wrap at 80 chars or whatever you like. Diffs are much more difficult to make sense of in either of these cases.
评论 #4645938 未加载
trhtrsh超过 12 年前
Lots of bizarre logic here:<p>&#62; Not only is it not a large portion of your keystrokes, but the space bar has your two strongest digits dedicated solely to it!<p>double-tapping a key is harder to execute than other key pairings.<p>&#62; Well that’s not right! Vim can’t easily tell the difference between the period after “Mr” and the end of a sentence. &#62; Two-spacing provides more semantic information,<p>If this is your concern, it's far more appropriate to use a different symbol/glyph for non-breaking dots.<p>&#62; So the next time you see that arrogant Slate article, feel free to be arrogant right back.<p>True. That Slate author's writings are unjustifiably smug.
spacemanaki超过 12 年前
It's funny, when I read or hear programmers arguing about where to put braces, whether to use tabs or spaces, and whether semicolons are good or bad, I've occasionally been depressed by the kind of petty debates we in software seem to enjoy. But this is a reminder that it's not just programmers, it's humans!<p>(Not to say that this is really a petty issue, I found the OP interesting enough, but it's about as important as spaces and tabs in the large domain of writing in general)
martinwnet超过 12 年前
After reading this I still don't understand <i>why</i> he uses two-space.<p>He sets up some arguments against two-space and counters them, but I still don't see what the point of two-space (or n-space). From the post all I can gleam is 1) it looks better in his opinion, 2) Vim sentence selection. Neither of which are convincing arguments to me I'm afraid...
评论 #4645629 未加载
bstar77超过 12 年前
I use two spacing simply because that is what I was taught in school. After having it drummed into my head for the better part of 10 years, I'm never going to change for anyone.
评论 #4645828 未加载
评论 #4645934 未加载
patmcguire超过 12 年前
Slate is typical. Arrogance is pretty much a given in any grammatical/typographical discussion. In the land of the pedants, the man who says "you and I" is king.<p>The vim ambiguity is part of the greater English punctuation suckage. If I end a sentence in Jr. or St., am I supposed to double up on the periods on the end, or will that just make me look stupid? I already had a period followed by a comma there, which looks pretty bad, and "My personal hero is Martin Luther King Jr.." just seems wrong.<p>Also, I think I'm supposed to write a comma after a quotation, but I would have done that I would have written '..",'. That's pretty bad, and only compounded by the period at the end. I'm not sure that it's in the right place, either - should it be inside the quotation marks according to the normal rule or can I put it outside the quotation marks to avoid ambiguity? Why is it so difficult just to write a sentence without it going horribly awry?
gavinlynch超过 12 年前
Neato.<p>If you also want to end your sentences with two periods or separate thoughts with two commas, go for it.<p>Please just don't pretend it is somehow proper or logical. As long as we're clear that you're doing it your own weird way just because... I see no harm. Carry on, two-space warrior! <i>shrugs</i>
评论 #4645560 未加载
lloeki超过 12 年前
&#62; <i>To recap, the arguments for single-spacing are: 1. Two-spacing is ugly in proportional fonts.</i> [..] <i>Number 3 is false, because two-spacing gives you two advantages over one-spacing: It looks better in your editor.</i><p>I beg to differ. I find that two-spacing feels wrong even in monospace. And even code is not write-only, so it's a stab in my eye every time I 'develop'.<p>Also, since both HTML and markdown use single-newline chars as word - not paragraph - delimiters, the semantic argument doesn't hold because I'll counter it with [0].<p>[0] <a href="http://rhodesmill.org/brandon/2012/one-sentence-per-line/" rel="nofollow">http://rhodesmill.org/brandon/2012/one-sentence-per-line/</a>
评论 #4645513 未加载
评论 #4645544 未加载
needle0超过 12 年前
&#62;Not only is it not a large portion of your keystrokes, but the space bar has your two strongest digits dedicated solely to it! If any fingers are going to wear out from typing, it won’t be your thumbs.<p>I beg to differ- as someone who DID get RSI-stricken thumbs from typing, even one space occasionally feels too much, thankyouverymuch.
driverdan超过 12 年前
Steve's point about vim is the first rational argument I've heard for using two spaces. Saying two spaces looks better with monospaced fonts is an opinion, one which I don't share. But I can buy into two spaces being semantic to your text editor.<p>I used to use two spaces before the web because that's how I learned it. Way back when I realized that browsers collapse consecutive spaces into one I stopped using them. This argument makes me rethink my position. It also reminds me that I really need to learn more of vim's shortcuts.
评论 #4646126 未加载
Create超过 12 年前
By default, Emacs considers a period followed by two spaces or by a newline as the end of a sentence; a period followed by just one space indicates an abbreviation, not the end of a sentence. Accordingly, the fill commands will not break a line after a period followed by just one space. If you set the variable sentence-end-double-space to nil, the fill commands will break a line after a period followed by one space, and put just one space after each period. See Sentences, for other effects and possible drawbacks of this.
Stratoscope超过 12 年前
&#62; Text editors use monospaced fonts!<p>&#62; It doesn’t matter what editor you use. Vim, Emacs, TextMate, Sublime Text, Eclipse, Gedit, Notepad++? All of them use monospaced fonts.<p>No they don't. What silliness is this?<p>From the author's list, Sublime Text, Eclipse, Gedit, and Notepad++ all support proportional fonts.<p>Of the other editors I use frequently, Komodo IDE, Visual Studio, UltraEdit/UEStudio, XML Marker 2, and MarkdownPad among others all support proportional fonts.<p>So write in a monospaced font if that's what you prefer, but nobody is making you do it.
评论 #4645933 未加载
lri超过 12 年前
All plain text isn't edited or displayed in a fixed-width font. Proportional fonts are used in email, IM, and IRC applications, full screen writing applications, note taking applications, Markdown editors and some LaTeX editors, and text areas on websites. Many email applications display plain text messages in a proportional font and without collapsing spaces.<p>The two space convention originally became popular to match the practice of inserting wider spaces between sentences in print, but that has more or less fallen out of use.<p>In many ways, simple typographic conventions are also more esthetical. Does there need to be a distinction between spaces that separate words and spaces that separate sentences? The additional semantic markup isn't worth the extra complexity in many cases. Having two different conventions also adds complexity. Single spaces could eventually become the only format people need to know about, but two spaces couldn't.
loup-vaillant超过 12 年前
Why <i>I</i> two-space: because I use Emacs, whose auto-fill-mode treats treats single spaces behind a dot as unbreakable. My text, my editor, my rules. I will happily one-space in a project where it is the convention though.<p>Did we need so much text?
alexchamberlain超过 12 年前
My arguement against 2 spaces and for 1 space is that 2 spaces is semantically wrong and 1 is semantically correct. We use a space to separate 2 words and a full stop (etc.) is used to indicate the end of a sentence. We don't need full stop and 2 spaces.<p>Now, traditionally, to increase readability, typographers used 1 and a half spaces after the end of a sentence. It looks pretty good and so someone decided that would be 2 on a monospace typewriter. However, our PCs are slightly (ish - not by much) more powerful than said typewriters and can work out when to use 1 and a half spaces if necessary.
评论 #4645341 未加载
评论 #4645499 未加载
lelf超过 12 年前
Oh, I remember<p>Two spaces after end of a sentence © GNU coding standards<p><a href="http://www.gnu.org/prep/standards/standards.html#Comments" rel="nofollow">http://www.gnu.org/prep/standards/standards.html#Comments</a>
atmz超过 12 年前
This is a pointless rant; the Slate article is clearly about presentation, and he's basically agreeing with it. He's right in that double-spacing what amounts to source code might be a good idea, but that doesn't change the fact that two-spacing in Word is Bad and lots of people still do it.<p>This is an example of a typical geek habit of jumping on the edge case and trying to use it to disprove a well-meaning article. That Slate article isn't for you; nobody cares or judges your Latex/HTML formatting.
rileyt超过 12 年前
I don't understand why people get so worked up about this. I personally one space, but I feel like the difference between the two is so minute that it shouldn't really matter...
flyosity超过 12 年前
For someone that cares so much about two-spacing I'd assume he'd also set up his HTML/CSS so that it actually preserves his two spaces after a period by some insertion of an HTML entity. As it stands now, if you View Source he definitely uses two spaces after a period but when outputted to the browser it's only one because the white-space is coalesced together by the rendering engine.
评论 #4645242 未加载
评论 #4645252 未加载
pi18n超过 12 年前
What an absurd thing to spend time debating. For anyone else that thought this was going to be about working spaces, it's actually about why double-spacing after a period is superior. The arguments amount to "because I like it" and "because it lets me do end-of-sentence regexes in vim without catching things like 'Mr.' and 'Etc.'".
mcguire超过 12 年前
&#62; Another widely-used format, LaTeX, splits the difference and actually uses somewhere between one and two spaces (by default).<p>Actually, it doesn't. TeX (the actual typesetter; LaTeX is a macro system on top) inserts a space that is slightly more stretchable than the space between words.
评论 #4646631 未加载
Simucal超过 12 年前
I two-space because it is was ingrained in me by my elderly typing teacher in school.
briandear超过 12 年前
This sounds like a rationalization for a behavior he already does. Likely the author was used to two spaces so, rather than change, he instead creates a framework of justification. Using his logic, why not three spaces? Or four?
testing12341234超过 12 年前
For those who want a more nuanced view, including cited sources and research, head over to <a href="http://www.heracliteanriver.com/?p=324" rel="nofollow">http://www.heracliteanriver.com/?p=324</a>
tommorris超过 12 年前
All I can say is: when I'm editing other people's text (say, on Wikipedia), I remove their silly two space silliness. I have a Vim command wired up that runs a regex for that purpose and I run it before saving.<p>Extra pointless bytes are extra and pointless.<p>(And, yes, I realise they will exist in the previous versions. And, no, it doesn't matter. I just like imposing my will on this to make up for the fact that I am currently single and lonely. I also like consistency, and if people are going to be consistent, they may as well be consistent in a way I like.)
msg超过 12 年前
Tl; dr bikeshedding and sentence manipulation in vim
trhtrsh超过 12 年前
&#62; Posted less than a minute ago on October 12, 2012.<p>What is this broken cache-incompatible time-tracking system he is using?
评论 #4645383 未加载
ble超过 12 年前
Narcissism of small differences, anyone?
pnathan超过 12 年前
I two space to ensure that each sentence is given clean separation between the previous and next sentences.
kstenerud超过 12 年前
markmm, your account was hellbanned 7 days ago.<p>moron, your account was hellbanned 72 days ago.<p>lean, your account was hellbanned 345 days ago.
mariusae超过 12 年前
Many modern text editors (can) use proportional fonts. It's quite nice. You should try it out sometime.
nodata超过 12 年前
Jesus that font is <i>unreadable</i>
评论 #4645473 未加载
jccc超过 12 年前
Interesting that he uses only one space after each of his colons.
评论 #4645267 未加载
anotherevan超过 12 年前
"You could get pedantic..."<p>But the author doesn't like the competition.<p>:-)
ehutch79超过 12 年前
is it just me, or does that article not use two-spaces?
评论 #4645489 未加载
评论 #4645648 未加载
knewter超过 12 年前
yeah, my reason for two spacing is just because it's right. One space after a period already means something (see his Mr. Smith example). So I'm left with something else to signify "I'm done with this sentence, gtfo."<p>But, more importantly, it's because people that don't two-space are big old dummies.