Sharing kdevelop preferences via git

Milian Wolff mail at milianw.de
Wed Dec 3 10:05:47 GMT 2014


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
> code into a project (file) which is then added to the git
> repository that we are using.  Then, anyone of us can open
> up the project file and the files all open up and everything
> is set for us.
> 
> I am trying to set this up, but with little success so far.
>   The project file seems to be the .kdev4 files.  Each has
> only two lines:
> 
> Manager=
> Name=
> 
> My personal settings, though, are stored outside of the git
> repository off my home directory.
> 
> This makes sense to me since this is the usual case.  If I
> am on another project, I want my preferences to carry over
> to it.  So...is sharing kdevelop preferences via git impossible?

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.

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.

> As a related aside, does anyone have any suggested reading
> on how to set up a Project.  Or, alternatively, what can go
> into the .kdev4 files?  I feel like I'm not using the notion
> of "Projects" to its full potential...

The .kdev4 files are, in their current state, pretty useless. We store 
practically no information in there. They are still required though to tell 
KDevelop which project manager to use.

Something to improve for the future, definitely.

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



More information about the KDevelop mailing list