News for hackers. Stuff that matters.
Re:Linus and Pull Requests (2012) by KirillPanov on Friday March 05, 2021 @11:56PM (#26365343)
> it drives me up a wall when people use it in things like email or Markdown documents

Are there many editors that can rewrap long lines in a Markdown-aware way when displaying long lines?

I mean if you create an outline with significant nesting depth (like 3+ levels) and all the items are more than one screenwidth worth of text, the editor linewrapping is going to make it impossible to see the structure.

Otherwise you get this unreadable mess:

  .   + Foo bar baz foo bar baz foo bar baz foo bar baz foo bar
  .   baz foo bar baz foo bar baz
  .     + Foo bar baz foo bar baz foo bar baz foo bar baz foo
  .   bar baz foo bar baz foo bar baz
  .       + Foo bar baz foo bar baz foo bar baz foo bar baz foo
  .   bar baz foo bar baz foo bar baz
  .     + Foo bar baz foo bar baz foo bar baz foo bar baz foo
  .   bar baz foo bar baz foo bar baz
Instead of this visually-apparent structure at the left edge (produced using emacs's hard-rewrap command "fill-region"):

  .   + Foo bar baz foo bar baz foo bar baz foo bar baz foo bar
  .     baz foo bar baz foo bar baz
  .     + Foo bar baz foo bar baz foo bar baz foo bar baz foo
  .       bar baz foo bar baz foo bar baz
  .       + Foo bar baz foo bar baz foo bar baz foo bar baz foo
  .         bar baz foo bar baz foo bar baz
  .     + Foo bar baz foo bar baz foo bar baz foo bar baz foo
  .       bar baz foo bar baz foo bar baz
(I had to add the periods at the left edge to prevent HackerNews's awful markup processor from "helpfully" mangling things... apparently "verbatim" only means "verbatim" if the whole block has the same level of indentation or something)

Hard-wrapping is basically an acknowledgement that text editors are never going to understand the semantics of all the markups and programming languages we use. And web browser text-edit widgets will be even worse. Then there's the situation where you have markup-within-code-comments. I don't think it's reasonable to expect editors to recognize how to rewrap all these different cases intelligently.

Re:Linus and Pull Requests (2012) by dmart on Saturday March 06, 2021 @12:03AM (#26365374)
With your example of a nested list, VSCode will correctly display line-wrapped inner items at the same indentation level.
Re:Linus and Pull Requests (2012) by KirillPanov on Saturday March 06, 2021 @12:08AM (#26365398)
Do you use VSCode to read your emails and edit Wikipedia?

Will it do this for Markdown inside of comments in C/C++/Rust code?

How does it even know you're using Markdown in comments as opposed to something else?

(I'll have to trust your answers since I don't have a Windows machine, let alone a Visual Studio license)

Re:Linus and Pull Requests (2012) by dmart on Saturday March 06, 2021 @12:16AM (#26365425)
I mean, there are definitely places where hard wrapping makes sense or is the only option. I’m not saying it’s never the right thing to do, just that with emails or full-Markdown docs specifically it tends to restrict the ability to render in an optimal manner more than it helps.
Re:Linus and Pull Requests (2012) by jscholes on Saturday March 06, 2021 @04:49PM (#26370832)
> (I'll have to trust your answers since I don't have a Windows machine, let alone a Visual Studio license)

You don't need a Windows machine or Visual Studio license to use VS Code, which is both cross-platform and free.