Managing templates

From the FileNew from Template... assistant, you can also download additional file templates by clicking the Get more Templates... button. This opens a Get Hot New Stuff dialog, where you can install additional templates, as well as update or remove them. There is also a configuration module for templates, which can be reached by clicking SettingsConfigure KDevelopTemplates. From there, you can manage both file templates (explained above) and project templates (used for creating new projects).

Of course, if none of the available template suit your project, you can always create new ones. The easiest way is probably to copy and modify an existing template, while a short tutorial and a longer specification document are there to help you. To copy an installed template, open the template manager by clicking SettingsConfigure KDevelop...Templates, select the template you wish to copy, then click the Extract Template button. Select a destination folder, then click OK, and the contents of the template will be extracted into the selected folder. Now you can edit the template by opening the extracted files and modifying them. After you are done, you can import your new template into KDevelop by opening the template manager, activating the appropriate tab (either Project Templates or File Templates) and clicking Load Template. Open the template description file, which is the one with the suffix either .kdevtemplate or .desktop. KDevelop will compress the files into a template archive and import the template.


When copying an existing template, make sure you rename it before importing it again. Otherwise, you will either overwrite the old template, or will end up with two templates with identical names. To rename a template, rename the description file to something unique (but keep the suffix), and change the Name entry in the description file.

If you want to write a template from scratch, you can start with a sample C++ class template by creating a new project and selecting the C++ Class Template project in category KDevelop.