Page 1 of 1

Command — Strip trailing spaces

Posted: Mon Nov 27, 2023 2:37 pm
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.

Re: Command — Strip trailing spaces

Posted: Tue Nov 28, 2023 10:12 am
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

Re: Command — Strip trailing spaces

Posted: Sun Dec 03, 2023 12:17 pm
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.

Re: Command — Strip trailing spaces

Posted: Sun Dec 03, 2023 3:18 pm
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.

Re: Command — Strip trailing spaces

Posted: Sun Dec 03, 2023 5:01 pm
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.