[Geany-devel] More intelligent 'remove trailing spaces' - Re: Strip trailing blank lines (patch included)
a.janke at xxxxx
Thu Sep 3 21:34:41 UTC 2009
>> Hmm, I usually use the Up cursor key to jump to the previous line and
>> then press Enter :).
> Yes, but sometimes the cursor will be at the start of the line after
> pressing up, so then the user also has to press End and then Enter.
That's sort of the crux of it and is the reason what I don't have
strip trailing spaces on. For me the simple fix is instead of having
the strip feature strip to an indent is to only strip trailing space
from lines that have a character in them.
ie (in perl parlance):
$_ =~ s/(\S+)\ +$/$1/;
At least I think that RE is right, I haven't checked.. :)
More information about the Devel