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

List:       kwrite-devel
Subject:    Re: Automatic indentation-detection in Kate and KDevelop
From:       Christoph Cullmann <cullmann () absint ! com>
Date:       2011-06-24 4:46:34
Message-ID: 201106240646.34754.cullmann () absint ! com
[Download RAW message or body]

On Friday 24 June 2011 01:20:40 Tirtha Chatterjee wrote:
> On Fri, Jun 24, 2011 at 1:13 AM, Christoph Cullmann <cullmann@absint.com> 
wrote:
> > On Thursday 23 June 2011 17:53:37 Erlend Hamberg wrote:
> >> So if a function in a script file could be run automatically when a
> >> document is opened, a simple function could simply look at the first 100
> >> (or whatever) lines and then guess settings for indentation width,
> >> whether to expand tabs to spaces and. If the results are too ambiguous
> >> or the file is empty, the default values can be used.
> > 
> > And then it needs to pass them over to the indenter, which either
> > requires some key/value store or changing the per document settings via
> > script, which I would be both fine with.
> 
> Do you think it would be better as a C++ module or a js script run
> before calling the indenters?
If it is language dependent, I would go for scripts, perhaps just an extra 
function in the indenters.
If it is very generic (like the vim stuff Erlend mailed), it may be just a 50 
lines C++ function we invoke that changes document settings on load.

Greetings
Christoph
_______________________________________________
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