Loading ...
Sorry, an error occurred while loading the content.

Re: EOL vs lbr when writing prose

Expand Messages
  • Tony Mechelynck
    ... IMHO README files should be plaintext, suitable for text pagers such as less, and that would mean hard line breaks spaced no more than 80 virtual
    Message 1 of 10 , Feb 24, 2009
    • 0 Attachment
      On 23/02/09 16:11, Daniel Choi wrote:
      > I've been writing my text documents in vim using hard line breaks and
      > reflowing the text as needed with gqap (via a shortcut).
      > Then I saw this blog post
      > http://tech.geoff.me/2008/05/vim-word-processor.html
      > and tried using Vim in a more word processor-y mode, with soft line
      > wrapping.
      > After about a week of that, I went back to the EOLs. I just liked the
      > hard wrapping better, and it made my text files work better with tools
      > like grep, diff, and git.
      > I'm little sad however to see an increase in soft wrapped README files
      > in software source code (particular in Ruby), which can be attributed
      > I'm sure to the rise of GUI text editors like TextMate.
      > Thoughts?

      IMHO README files should be plaintext, suitable for text pagers such as
      less, and that would mean hard line breaks spaced no more than 80
      "virtual" characters apart. By "virtual" I mean that "wide" CJK
      characters count double, and that hard tabs (if any) are worth between
      one and eight "virtual characters" each.

      As for writing prose in general, it all depends what file type
      (technically, what MIME type) you use for it, and who/what the files are
      meant for. Prose in plaintext and meant to be distributed to people on
      any kind of computers should have lines no longer than 80. Plaintext
      prose for your own use can be anything. I'd recommend lines short enough
      for your printer (for the :hardcopy command) -- if you _have_ a printer.
      For prose in HTML the length of lines in the source text mostly doesn't
      matter, since spaces, tabs, and linebreaks are mostly all "whitespace".
      (Exception: inside <pre></pre> tags.) For mail, it's usually regarded as
      "good form" to use hard breaks at most 75 or so characters apart, though
      format-flowed can be used to tell the receiving mail client that those
      "short" lines should be concatenated on display. And so on.

      Program _source code_ is not the same as _prose_. (Source code can be
      written e.g. in C, Ada, Perl, Javascript, etc. Prose is written in
      English, French, German, Chinese, Urdu, Cherokee, etc.) IMHO the length
      of program source lines should depend on the language's syntax, and
      there are so many different programming languages that I can't imagine
      any "general" rule valid for all of them.

      Best regards,
      Lawmakers made it obligatory for everybody to take at least one bath
      each week -- on Saturday night.
      [real standing law in Vermont, United States of America]

      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
    Your message has been successfully submitted and would be delivered to recipients shortly.