[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwrite-devel
Subject:    Re: Trailing spaces still in document after saving
From:       Gerald Senarclens de Grancy <gerald () senarclens ! eu>
Date:       2013-06-24 18:57:20
Message-ID: CAPszUgiPH-3UXoQq-MuBBsHjwo5RYRYu34uwPJzytYKg4KwxfQ () mail ! gmail ! com
[Download RAW message or body]

Hi Steve,
thanks for your observation.  The reason for not removing whitespace
from the current line is that while typing, you might occasionally
save the document. If you do this while you edit source code and have
just finished a line of code by hitting the enter key, you'd
unconsciously lose the proper indentation by having the whitespace
removed.

As an example, when writing Python code you might type:
if magic_condition:
and then hit enter which correctly adjusts the indentation. When you
save the document, this isn't changed as you'd usually continue to
type.

Unfortunately I cannot suggest a proper workaround for you.
Hope the above explanation helps, Gerald

On Mon, Jun 24, 2013 at 4:35 AM, Steve Pryde <spryde81@gmail.com> wrote:
> Hi,
>
> I've been using kate for years and the update for 4.10 was fantastic, it
> fixed a lot of bugs.
>
> However, I still see trailing spaces in some files after saving them, and
> have just worked out why.
>
> If the cursor is currently positioned after some trailing whitespace, this
> whitespace is not removed when saving the file. This happens even if the
> "Removing trailing spaces" option is set to "Entire Document".
>
> I came across this article online:
> http://kate-editor.org/2012/10/27/remove-trailing-spaces/
>
> which contains this:
> 'The implementation of this feature unfortunately had quite some regressions
> that we were able to "fix" over time. For instance, you do not want to
> remove trailing spaces if the cursor is currently in the trailing spaces
> area.'
>
> So it looks like this is intentional - but I can't figure out why anyone
> would want this.
>
> Surely if someone selects that they want whitespace removed from the "Entire
> Document", they really do mean that they want whitespace removed from the
> *entire* document.
>
> Is there a workaround to this?
>
> Thanks,
> Steve.
>
> _______________________________________________
> KWrite-Devel mailing list
> KWrite-Devel@kde.org
> https://mail.kde.org/mailman/listinfo/kwrite-devel
>



-- 
Gerald Senarclens de Grancy
http://senarclens.eu/~gerald/
Open minds on open source!
_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic