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

List:       kwrite-devel
Subject:    Re: [patch] Ability to force indent with spaces in alignment from
From:       "Robin Pedersen" <robinpeder () gmail ! com>
Date:       2008-05-30 16:27:50
Message-ID: op.uby6oo2g9lgty9 () lenobin
[Download RAW message or body]

On Fri, 30 May 2008 16:33:45 +0200, Jakob Petsovits <jpetso@gmx.at> wrote:

> On Friday, 30. May 2008, Robin Pedersen wrote:
>> I never knew what "mixed mode" meant. but I think the configuration user
>> interface should contain something like this:
>>
>>     Replace tabs with spaces:
>>     ( ) Never
>>     (X) Only when code is aligned (default setting)
>>     ( ) Always
>
> I disagree, because
>
> 1. if there is such a GUI, all indentation scripts need to implement both
> always-replace and mixed mode, which might be infeasible.

Actually, indent scripts only need to implement the "mixed mode". If the  
user selected "always replace", the application could just use max(indent,  
alignment) as both indent and alignment, which gives the correct result.  
However, I agree that adding this option in the GUI would force scripts to  
implement separation between indentation and alignment to some degree.

> 2. find me one single case where "Always" is preferrable to mixed mode.
> I think there is no such case, and it's just a technical limitation.

I certainly agree. I would never use the "always replace" option. But I'm  
trying to get the approval for a new feature here, and it always seems  
easiest to get such approval it there's an option to the old behavior. No  
matter how unpreferable it would be.

> Thus, when in tab mode, the script should always do what's best for tabs.
> That can be done by one single option ("use tabs instead of spaces"), and
> *how* to do this should be up to the script.
>
> Imho. I think it's a bad idea, usability-wise, to have three options  
> instead
> of one checkbox just because a solvable technical problem is not solved  
> right now.

The real question in this thread is whether to implement the alignment  
feature at all. What is your opion on that?

> Wishes,
>   Jakob

-- 
Robin Pedersen
_______________________________________________
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