Let's end the formatting mess

Milian Wolff mail at milianw.de
Thu Nov 10 19:52:34 UTC 2011


Forwarding to devel list again.

On Thursday 10 November 2011 20:25:09 David Nolden wrote:
> 2011/11/10 Milian Wolff <mail at milianw.de>:
> > On Thursday 10 November 2011 17:42:09 David Nolden wrote:
> >> 2011/11/10 Milian Wolff <mail at milianw.de>:
> >> > Yes but that requires work on Kate to be able to read/write the editor
> >> > settings. Which is not yet possible, but another long standing wish
> >> > request.
> >> 
> >> I've just seen that all these things can be sent to kate through the
> >> CommandInterface, eg. "set-indent-length 2" and "set-replace-tabs
> >> true" lead to standard 2-space indentation.
> > 
> > True, but this is pretty hackish and can break easily in the future
> > without us getting notified via compile issues...
> > 
> > Menaing: I still think it is required to get a proper editor interface for
> > this.
> 
> Meanwhile I've implemented this. Now the user simply has to edit the
> source-formatter settings, and the editor settings are adapted
> automatically. The only problem is that modelines are re-evaluated
> after every saving, so wrong modelines will lead to wrong indentation
> after the first save. However, reformatting now also fixes modelines
> even if "Add Kate Modeline" is not checked.
> 
> I think we have a great overall source-formatting support now.

I have yet to try it out, but modelines should always take preference over 
session-wide formatter settings as there is no other way to set custom 
settings for just one file or just one sub dir otherwise.

bye

-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20111110/6ddcaf4d/attachment.sig>


More information about the KDevelop-devel mailing list