[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:       Dominik Haumann <dhdev () gmx ! de>
Date:       2011-06-29 21:49:54
Message-ID: 201106292349.55112.dhdev () gmx ! de
[Download RAW message or body]

Any updates here?
http://bugs.kde.org/show_bug.cgi?id=194014

As Christoph said, if the heuristics are good enough for all file types, it 
should be C++. (It can be overwritten optionally in the indenters later, 
still).

Greetings
Dominik

On Friday, 24. June 2011, Christoph Cullmann wrote:
> 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

_______________________________________________
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