Setting code to maximum width of 80 characters [closed]

Tag: code-organization Author: heller20077 Date: 2012-11-15

Are there any websites than can automatically set large chunks of code (PHP, JS and CSS) to a maximum width of 80 characters to ensure that no lines wrap?

Best Answer

Cloud9 IDE has this feature. It's in the View menue I think, you have to unselect wrap lines to viewport.

Other Answer1

Try using the ch unit described in the CSS3 specification:

Equal to the used advance measure of the "0" (ZERO, U+0030) glyph found in the font used to render it.

Thus max-width: 80ch limits the width to 80 characters.