Page 1 of 1

Trim Trailing Whitespace

Posted: Thu Jan 27, 2005 9:10 am
by jd_csfb
This is a function that could probably be done with a macro, but it would be a lot more efficient to do it with code - stripping whitespace off of the end of lines in a block. It would even be useful if it could be configured to happen automatically (a-lá VB).

Posted: Thu Jan 27, 2005 10:46 am
by s_reynisson
Hmm.. Configure->Preferences->Document Classes->Default and tick "Strip trailing spaces from lines when saving"? HTH

Posted: Fri May 13, 2005 12:22 pm
by RicardoDaVee
Saving to strip trailing spaces is a pain and I often use TP to reformat/process large files
I want to be able to select a region & do this.

Posted: Fri May 13, 2005 12:46 pm
by ben_josephs
Using Search | Replace... :
Find what: _+$
Replace with:

[X] Regular expression
(I.e., replace it with nothing.)
(The _ represents a space.)