Creating file template in Geany

Templates allow you to create a new file prepopulated with some default content and some dynamic ones, like date. There are a number of default templates included with Geany, from html to pascal programs.

First off, these steps are being done on a Linux environment.

By default, there are a number of built-in templates located in - /usr/share/geany/templates/files. You can create your own templates by placing them in - ~/.config/geany/templates/files.

Customising templates

Templates can be customised by enclosing wildcards in curly braces { }. There are a number of wildcards that are part of Geany's settings.

Global wildcards

Wildcard Description
developer the name of the developer
initial the developer's initials
mail the developer's email address
compnay the company name
version the initial version of a new file

Date & time wildcards

Wildcard Description
year the current year, default format: YYYY
date the current date, default format: YYYY-MM-DD
datetime the current date and time, default format: DD.MM.YYYY HH:mm:ss ZZZZ

Dynamic wildcards

Wildcard Description
untitled I think this is the default title
geanyversion the actual Geany version
filename the filename of the current file
project the current project, if set
description the current project's description, if any
functionname the function's name where the cursor is at
command:path executes the specified command and replace the wildcard with the command's standard output