TR / TRR - Trim Trailing Blanks
TRR / TRR
TRR is the block form of this command.
A number that tells the editor the desired minimum length of trimmed lines.
The TR command is used to trim trailing blanks from one or more lines. Its sole purpose is to selectively trim trailing blanks; no other data changes take place.
Here, n is a minimum line size. If omitted, n defaults to 0, which is a legal n value. That is, if n is zero or omitted, the minimum resultant line length is zero, which, if applied to a "blank" line, will result in a line of length zero because the entire line's contents of blank characters has been deleted.
Lines which have no trailing blanks are left unchanged by the Trim command. When the n value is specified, and a given line already contains n or fewer characters, it is considered a "short line"; short lines are not trimmed any further, even if they contain trailing blanks.
Using the TR command with the Forward and Backward Modifiers
If the TR command is specified as TR/ or TR\ it means all lines (forward or backward) are trimmed of all trailing blanks.
For example, if you wished to trim the entire file of trailing blanks, you can place a line command of TR/ on line 1 and press Enter.
It is possible to map the TR command to a key in order to trim the entire file, by mapping LINE TR/ .1 to an available key. A suggested key for this is Ctrl-Shift T.
Created with the Personal Edition of HelpNDoc: Generate Kindle eBooks with ease