nature-of-code / noc-book-2-archive

Repository for The Nature of Code book with p5.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Whitespace, indentation, line wrap consistency

shiffman opened this issue · comments

I'm assuming @joeyklee that with #27 your text editor auto-formatted the HTML in terms of indentation and word wrap. Is this something we should establish via some sort of .vscode or otherwise config file so that we are consistent?

Generally I prefer "soft wrapping" the text within the editor as when I'm rewriting it allows me to not have to manage the line breaks, but I do realize that can be awkward in other ways.

@shiffman - ah yes that's correct.

It's definitely easier to read when the text is not super long, so I'd def. cap it at 60 char or something if we decide to add the .vscode config.

I would slightly favor using a code formatter so that we see the content more consistently. By using soft-wrapping it could be the case that things might get missed?

Ok, I can get used a code formatter doing the wrapping. Ideally the steps to bring a new chapter in would be:

  1. Copy html file.
  2. Format whitespace indentation.
  3. Commit, pull request, merge.
  4. Start editing!

Got it! Before I start editing, I'll be sure to format the file. Thanks!

See #57 for some initial settings. I used 100 instead of 80 for line length as it's a little extra space for the index terms and other common elements in the html source. A lot of the paragraphs are already formatted at 80 and maybe that's more standard?

No longer relevant with the new build system woohoo!!!