File Templates
Prev
Next

File Templates

Anders Lund

Revision 0.1 (Mon Feb 16 2004)

The File Templates plug-in allows you to create files based on other files. You can use any file as a template, which will create a copy of the file with an empty URL, or use a special template file which may contain macros to fill in information like your name and email address, the current date and so on, and position the cursor at a convenient position in the new file.

Furthermore, templates located in the template directories will be presented in the menu item File->From Template...

The plug-in also provides a method to easily create a new template from an open document.

The template directories is part of the KDE file system, and consists of at least KDEDIR/share/applications/kate/plugins/katefiletemplates/templates and KDEHOME/share/applications/kate/plugins/katefiletemplates/templates. If your KDEDIRS environment variable contains additional directories, those are searched for a similar subdirectory as well. If equally named templates are found, the one in the local (KDEHOME) directory is chosen.

Menu Structure

File+New From Template->Any File...

Presents you with Open File dialog that allows you to use any file as a template. If the chosen file has the extension katetemplate it will be parsed for template information and macros.

File+New From Template->Use Recent

Presents a list of files recently used as templates, represented by their URL.

File->New From Template

The remainder of submenus contains links to templates. Click a menuitem to create a file as described by the menu item text.

Settings->Manage Templates

This will launch a dialog with a list of all templates found within the template directories, along with options to add, edit or remove templates.

Prev
Next
Home


Would you like to make a comment or contribute an update to this page?
Send feedback to the KDE Docs Team