(→Remove Trailing Spaces from the Current File) |
|||
| (2 intermediate revisions by the same user not shown) | |||
| Line 25: | Line 25: | ||
Assuming you have the default <kbd>USER</kbd> menu loaded, it is easy to remove trailing spaces. | Assuming you have the default <kbd>USER</kbd> menu loaded, it is easy to remove trailing spaces. | ||
| + | |||
| + | ==Remove Trailing Spaces from the Current File== | ||
| + | |||
| + | To remove all trailing "whitespace" (space and tabs) from the entire file click <kbd>User</kbd> then <kbd>Remove trailing spaces</kbd>. The spaces will be removed and the cursor position will be restored. | ||
| + | |||
| + | The status line briefly indicates how many lines had trailing whitespace removed. | ||
| + | |||
| + | ==Related Resources== | ||
| + | *[[Convert_Windows_Mac_Linux|Convert Between Windows, Mac and Linux File Types]] | ||
| + | *[[Convert_Windows_Mac_Linux#Confirm_File_Type|Confirm File Type]] | ||
| + | *[[Convert_Fixed_Length_Records|Convert Fixed-Length Records]] | ||
| + | *[[Pad_Lines_To_Same_Length|Make All Lines the Same Length]] | ||
A common operation when converting files, or just cleaning up files, is to remove trailing spaces. (Trailing spaces are “extra” spaces past the ends of lines.) Trailing spaces can come from several sources:
While trailing spaces generally don't cause problems, sometimes they do, especially if some lines have many trailing spaces. For example, a line with many trailing spaces may print as two lines, with a blank second line. This can be very confusing.
There are several ways to see if a file has trailing spaces.
Assuming you have the default USER menu loaded, it is easy to remove trailing spaces.
To remove all trailing "whitespace" (space and tabs) from the entire file click User then Remove trailing spaces. The spaces will be removed and the cursor position will be restored.
The status line briefly indicates how many lines had trailing whitespace removed.