Trim Trailing Whitespace

Ideas for new features

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
jd_csfb
Posts: 7
Joined: Tue Jan 25, 2005 3:57 pm
Location: London

Trim Trailing Whitespace

Post 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).
User avatar
s_reynisson
Posts: 939
Joined: Tue May 06, 2003 1:59 pm

Post by s_reynisson »

Hmm.. Configure->Preferences->Document Classes->Default and tick "Strip trailing spaces from lines when saving"? HTH
Then I open up and see
the person fumbling here is me
a different way to be
RicardoDaVee
Posts: 1
Joined: Fri May 13, 2005 12:17 pm

Post 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.
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Using Search | Replace... :
Find what: _+$
Replace with:

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