(→Remove Trailing Spaces from the Current File) |
|||
| Line 26: | Line 26: | ||
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== | + | ===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. | 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. | ||
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.