As I am using version control (hg) it is convenient to have hard line breaks in my tex files.
Is there a way to set up TeXShop so that it automatically inserts line breaks? (For instance, as I am typing, at some fixed maximum width.)
If this is not possible, is there a convenient command line way to insert hard line breaks into a whole file automatically? (I tried, for instance, "cat longlines.tex | tr '\r' '\n' > shortlines.tex", but this does not work because TeXShop does not even put in Mac breaks '\r'.)
fmt
program on unix.fmt
program? That inserts the line breaks for you (but I don't know how safe it is with regard to TeX - it might break some stuff in the preamble by inserting line breaks when there shouldn't be any).