Command — Strip trailing spaces

Ideas for new features

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

Post Reply
IanOfYork
Posts: 93
Joined: Sat Nov 04, 2017 11:54 am
Location: York, England

Command — Strip trailing spaces

Post by IanOfYork »

There is currently an option to strip training spaces when a file is saved.

Please add this as a menu command — perhaps in Edit, below Reformat — so that temporary text does not need to be saved to a file.
ben_josephs
Posts: 2456
Joined: Sun Mar 02, 2003 9:22 pm

Re: Command — Strip trailing spaces

Post by ben_josephs »

Search | Replace... (<F8>):
Find what: _+$ [Replace the underscore with a space]
Replace with: [nothing]
[X] Regular expression
Replace All
You can save this as a macro:
Replace = " +$", "", RegExp
DoReplaceAll
IanOfYork
Posts: 93
Joined: Sat Nov 04, 2017 11:54 am
Location: York, England

Re: Command — Strip trailing spaces

Post by IanOfYork »

Sure, but the code is already part of TextPad and it would be good if it could be available as a menu command.
ben_josephs
Posts: 2456
Joined: Sun Mar 02, 2003 9:22 pm

Re: Command — Strip trailing spaces

Post by ben_josephs »

When you create a macro it automatically becomes available as a menu command. And you can give it whatever keyboard shortcut you please.
IanOfYork
Posts: 93
Joined: Sat Nov 04, 2017 11:54 am
Location: York, England

Re: Command — Strip trailing spaces

Post by IanOfYork »

Sure, but the code is already part of TextPad and it would be good if it could be available as a menu command.
Post Reply