Home » Products » UEStudio » UES Tour » Templates

UEStudio integrated development environment tour: templates

The UEStudio tour is intended to guide you through some of the advanced IDE features of the application. UEStudio includes all of the features of UltraEdit, the world's best text editor, which are not covered here.

UEStudio tour: templates

Do you find yourself repeatedly using the same chunks of text or source code? UEStudio offers you a simple means to reuse this text rather than creating it from scratch every time it's required. Templates are predefined text that may be recalled automatically at a later time and inserted into a file. Select Display/Modify Templates from the advanced menu to display the dialog for editing the templates.

Define template dialog in UEStudio

Up to 50 templates may be defined. Each of the first 20 templates may be recalled at a later time using hot keys Alt+0 through Alt+9, and Shift+Alt+0 through Shift+Alt+9, or any of the templated may be recalled with the insert template dialog.

Insert template dialog

Each template may optionally have a name associated with it, that if defined will show up on the tool tips on the toolbar and in the list of templates when inserting a template.

The templates are stored in a file in the default directory or the directory specified in the Advanced -> Configuration -> Directories panel.

A template may contain special text strings that are translated at the time the template is recalled. These special strings are:

StringMeaning
[DATE_DMY]Is translated into the current date with the format DAY/MONTH/YEAR.
[DATE_MDY]Is translated into the current date with the format MONTH/DAY/YEAR.
[DATE_TEXT]Is translated into the current date with the date displayed as text.
[TIME]Is translated into the current time IN 24 HOUR FORMAT.
^This indicates the position at which to place the cursor after the template has been inserted.
[FULL_FILE_NAME]Is translated into the full path and filename of the active document.
[FILE_PATH]Is translated into the drive and path of the active document.
[FILE_NAME]Is translated into the root filename of the active document.
[FILE_EXTENSION]Is translated into the file extension of the active document.
[$REPLACE$]Is replaced with selected text in the active document. The selection will be converted to uppercase text when inserted with the template.
[$replace$]Is replaced with selected text in the active document. The selection's current case will be maintained when it is inserted with the template.

Note - ^ refers to the character '^' NOT control key + value.

Additionally, for extended date and time formatting, UEStudio supports the following enhanced functionality:

Time
To specify the USER TIME format use the following syntax in your template:

For local time use the following markers:

[TIME_USER]...time format string here...[TIME_USER_END]

For system time use the following markers:

[TIME_USER_SYS]...time format string here...[TIME_USER_SYS_END]

The time format string is defined as follows:

If you use spaces to separate the elements in the format string, these spaces will appear in the same location in the template. The letters must be in uppercase or lowercase as shown (for example, "ss", not "SS"). Characters in the format string that are enclosed in single quotation marks will appear in the same location and unchanged in the template.

StringMeaning
hHours with no leading zero for single-digit hours; 12-hour clock
hhHours with leading zero for single-digit hours; 12-hour clock
HHours with no leading zero for single-digit hours; 24-hour clock
HHHours with leading zero for single-digit hours; 24-hour clock
mMinutes with no leading zero for single-digit minutes
mmMinutes with leading zero for single-digit minutes
sSeconds with no leading zero for single-digit seconds
ssSeconds with leading zero for single-digit seconds
tOne character time marker string, such as A or P
ttMulticharacter time marker string, such as AM or PM

For example, to get the time string

11:29:40 PM

...use the following format string:

hh':'mm':'ss tt

This string MUST be between the markers, for example:

[TIME_USER]hh':'mm':'ss tt[TIME_USER_END]

Date To specify the USER TIME format use the following syntax in your template:

For local date use the following markers:

[DATE_USER]...date format string here...[DATE_USER_END]

For system date use the following markers:

[DATE_USER_SYS]...date format string here...[DATE_USER_SYS_END]

The date format string is defined as follows:

Use the following elements to construct a format string. If you use spaces to separate the elements in the format string, these spaces will appear in the same location in the template. The letters must be in uppercase or lowercase as shown in the table (for example, "MM" not "mm"). Characters in the format string that are enclosed in single quotation marks will appear in the same location and unchanged in the template.

StringMeaning
dDay of month as digits with no leading zero for single-digit days.
ddDay of month as digits with leading zero for single-digit days.
dddDay of week as a three-letter abbreviation.
ddddDay of week as its full name.
MMonth as digits with no leading zero for single-digit months.
MMMonth as digits with leading zero for single-digit months.
MMMMonth as a three-letter abbreviation.
MMMMMonth as its full name.
yYear as last two digits, but with no leading zero for years less than 10.
yyYear as last two digits, but with leading zero for years less than 10.
yyyyYear represented by full four digits.

For example, to get the date string

Wed, Aug 31 94

use the following format string:

ddd',' MMM dd yy

This string MUST be between the markers, for example:

[DATE_USER]ddd',' MMM dd yy[DATE_USER_END]


UEStudio tour topics

Back to top


Buy Now
Upgrade
Download

Get your solution today!

UEStudio/UltraCompare Solution

Add UltraCompare to your purchase/upgrade of UEStudio and complete your file management solution.

Existing UltraEdit users
UltraEdit to UEStudio

Upgrade from UltraEdit

to UEStudio and...

...receive a $30 credit!