top | item 31809830

(no title)

pgcj_poster | 3 years ago

I tend to write prose source code

with line breaks after grammatical units.

I've noticed that since I started doing so,

I've been writing longer paragraphs and sentences,

since the line breaks in the source do for me

what paragraph and sentence breaks do for the reader.

It's something I have to pay attention to.

discuss

order

kadoban|3 years ago

Writing like this works really well for vim and git as well. It makes it easy to delete/move/edit lines (eg with: d2j), and then in git the diffs are by default formatted nicely and contain only sentences.

Though if you wanted to get fancy you could use other vim movement commands (yank the next 2 sentences), I still think it's easier using lines.