[Geany-devel] Strip trailing blank lines (patch included)
enrico.troeger at xxxxx
Wed Aug 26 18:50:28 UTC 2009
On Wed, 26 Aug 2009 19:48:30 +0400, Eugene wrote:
>I wrote new `editor_strip_trailing_newlines' function (see the
>attached patch). Currently I call it directly from
>`document_save_file' if `strip_trailing_spaces' setting is set. Of
>course, it's not how it should be. Maybe separate menu item and option
>should be added, like for trailing spaces. Alternative way is to
>combine those, i.e., rename "Strip trailing spaces" to "Remove
>excessive whitespace" :-) These all are usability issues, with which I
>don't like to deal. If any of the developers has an opinion upon
>those, I'll consider it and update the patch.
Hmm, I'm not sure that would be an often used feature but of course it
can be useful and you already wrote the code (and used it on the
modified files in your patch...I like to have two or three trailing
blank links at EOF :D).
Back to the topic, what about putting this into a plugin?
Either as a separate plugin which might be a bit overhead, or as part
of the addons plugin which aims to collect such small pieces of
additions or as a new (core) plugin into which we could move the
existing other both related features, too.
Just some thoughts. Opinions?
>P.S. My code leaves one trailing newline if `final_new_line' setting
>is set. Otherwise, it removes all trailing newlines. I believe it is
Me too. Sounds reasonable.
Get my GPG key from http://www.uvena.de/pub.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: not available
More information about the Devel