Started to work on source-formatter
Esben Mose Hansen
kde at mosehansen.dk
Sat Dec 5 11:52:24 UTC 2009
On Saturday 05 December 2009 12:05:50 David Nolden wrote:
> The problem is
> a) While writing code, it is no 'valid' code, so you don't know what it's
> becoming, and thus you cannot indent it properly.
> b) "Indent on enter" would (hopefully) be compatible with publically
> accessible indenters like "astyle", "uncrustify", etc. without
> modifications, while for indent-per-keystroke you'd probably need a
> completely own indenter solution that also works on partially written code
> by anticipating what you might be writing. Past has shown that we don't
> have the resources the maintain such a beast. ;-)
>
> Well, we could try to emulate some "indent on stroke"-like behavior with
> some hacks, but only if we find a solution on how to use external
> indenters for that. The public interface for indenters is usually "give
> file text" -> "return reformatted file text" and not much more.
>
It seems to me that we need a "complete this line for me" functionality, then.
Might be nice as a keystroke, too.
e.g.
int getint() const { return getmyprivateint
->
int getint() const { return getmyprivateint(); }
would that be impossible?
--
Kind regards, Esben
More information about the KDevelop-devel
mailing list