Page 1 of 1
Deleting spaces
Posted: Sat Feb 11, 2012 2:23 am
by gcotterl
How can I remove all spaces between the last character and the end of the line?
Posted: Sat Feb 11, 2012 4:31 am
by ak47wong
Find what: _*$ [replace the underscore with a space]
Replace with: [nothing]
Posted: Sat Feb 11, 2012 6:05 am
by gcotterl
That worked. Thank you.
(I clicked Configure/Preferences/Document Classes/Default and ticked the "Strip trailing spaces from lines when saving" box. I then saved the file and re-opened the file but the trailing spaces were still thee).
Posted: Sat Feb 11, 2012 9:12 am
by ben_josephs
Try closing the file, then opening it again, or try
View | Document Properties | Preferences | Strip trailing spaces from lines when saving.
A good general rule is never to use * when + will do. Using + avoids matching nothing, and in a case like this avoids repeatedly replacing nothing with nothing. It can make a huge difference to the speed of the operation.