2 Inserting Templates

This functionality is available via the TeX-Suite > Templates menu. This module provides a way to insert custom templates at the beginning of the current file.

When Latex-Suite first starts up, it scans the template directory and creates menu items based on the files found there. When you select a template from this menu, the file will be read in above the first line of the current file.

A template file can utilize placeholders for initializing the cursor position when the template is read in and subsequent movement. In addition, template files can contain dynamic elements such as the time of creation of a file etc, by using vim expressions.

You can place your own templates in the template directory in order for them to be available via the menu.


Templates are also accessible for non-gui users with the command |:TTemplate|. The argument should be name of the corresponding template file. If the command is called without arguments (preferred usage), then a list of available templates is displayed and the user is asked to choose one of them.