Do your markdown a favour and wrap lines at 80 character.

The original post first appeared on my coderwall profile on Jun 6. I don’t feel that coderwall protips are as easily accessible as it used to be so I decided to ‘reprint’ the post here.

As a rule of thumb you should keep line length to 80 characters in markdown files. I’m using the following setup in Vim to display where the boundary is:

" .vimrc
set cursorline
set textwidth=80
let &colorcolumn=join(range(81,999),",")

Nothing, of course, stops you from exceeding that number:

You can quickly shorten (wrap) lines to 80 characters using gq format tool. I’m using par for this purpose.

" Reformat a paragraph with `par`
gqap

It works OK, but it’s still not readable. Fortunately with Dr. Bunsen formd tool you can switch between reference and inline urls:

The file after reformatting looks much better, don’t you think?