Add fixwhite(1).
This small utility can be used to `sanitize' the whitespace in source code. It does the following things:
Global: - Remove empty lines at the beginning and the end of a file. - Merge successive empty lines into a single empty line.
Per-line: - Remove trailing whitespace. - Merge spaces preceeding tabs into the tabs.
It operated on stdin/stdout. This means that if you use vi(1), you can just run :%!fixwhite to reorganize the file.
|