Sharing kdevelop preferences via git

Milian Wolff mail at milianw.de
Tue Dec 9 10:31:34 GMT 2014


On Tuesday 09 December 2014 18:35:08 Raymond Wan wrote:
> Dear Milian, Nicolai, and Matthew,
> 
> Sorry for the late reply, but I was away from e-mail for a
> few days.
> 
> On Wednesday, December 03, 2014 09:05 PM, Milian Wolff wrote:
> > On Wednesday 03 December 2014 16:02:49 Raymond Wan wrote:
> >> Hi all,
> >> 
> >> I guess this is a mix git + kdevelop question.  But, I think
> >> between the two, this question is perhaps more relevant to
> >> kdevelop (correct me if I am wrong!).
> >> 
> >> I am working on a software project with other collaborators
> >> and we seem to all be using kdevelop (so far).  In the hopes
> >> of trying to standardize tabbing, spacing, etc. we are
> >> wondering if it is possible to combine all of the source
> > 
> > This "depends". The quick (and sad) answer is that, yes, sharing KDevelop
> > preferences over git is basically impossible. However for the usecase you
> > describe above, you can use a .kateconfig file in your project, which you
> > can also share over git. In there, you can specify Kate modelines (see
> > also the answer by Nicolai). This allows you to at least configure the
> > editor to use the proper spacing etc. pp.
> 
> Thank you for this!  That's what I was looking for!
> 
> Honestly, I never heard of the term modelines before and
> that prevented me from finding out what I needed to know.
> Typing "git and kdevelop" with other terms after into Google
> kept giving me pages describing how git is integrated into
> kdevelop.  :-)
> 
> I was playing with it today and it seems if I change the tab
> width (or anything else), the change is successful, but
> within the GUI, the value isn't updated.  Is this expected
> behavior?
> 
> Also, tab-width seems to work, but something like this:
> 
> current-line-color #ff0000;
> 
> does not.  (Yes, red is an annoying colour, but I am just
> playing with it; I'm not sure if I will really keep it red.)
> 
> Is this what you and Nicolai were referring to?  Modelines
> associated with spacing, etc. will work, but something like
> current-line-color will not?
> 
> > All other KDevelop specific settings are, currently, not shareable
> > however.
> > This is a long-standing feature request, but relatively complicated to
> > implement, which is why none did the work for that so far. The biggest
> > obstacle is finding a proper GUI for the settings, such that users can
> > define where settings should be stored. Then, all code needs to be
> > refactored that reads/writes configuration values, as we then suddenly
> > need to take the different configuration levels into account. Not
> > impossible, but not easy either.
> 
> That is ok!  I think when it comes to programming
> collaborations, spacing is perhaps the most contentious
> setting.  Even current-line-color (above) doesn't really
> matter...I think I was just trying to understand how
> modelines work.

You can play around with what is possible. Just open a file, e.g. a C++ file, 
and add a comment of the type

// kate: 

Then, request code-completion after that. All offers are "valid" modelines, 
you can put into your .kateconfig file. Also read this, e.g.:

http://kate-editor.org/2006/02/09/kate-modelines/

Bye
-- 
Milian Wolff
mail at milianw.de
http://milianw.de



More information about the KDevelop mailing list