Defining shorthands

See Also
Words Vs. Shorthands
Managing shorthand libraries

Simple shorthands

Simple shorthands don't have any parameters. It just uses a short name to represent the full text which consists of more characters. Examples are given below,

shorthand

full text

asap

as soon as possible

gtg

got to go

mailtemp

Dear sir or madam,

Best regards,
John Smith.

syl

see you later

Special control symbols

You can include special control symbols in shorthand full text. Their meanings are listed in the following table.

control symbol

meaning

\cr

simulate carriage return key to begin a new line

\lt

simulate left arrow key to move cursor backward

\rt

simulate right arrow key to move cursor forward

\up

simulate up arrow key to move cursor upward

\dn

simulate down arrow key to move cursor downward

\pu

simulate page up key to move a page backward

\pd

simulate page down key to move a page forward

\hm

simulate home key to move cursor to start of line

\en

simulate end key to move cursor to end of line

\bk

simulate backspace to delete the last entered char

\dlxxxx

delay for xxxx/10 seconds

Generally you have no need to use '\cr' since you can directly input carriage return to generate multiple-line text in the shorthand editor since Ver 2.0.

Parameterized shorthands

This type of shorthands provides more flexibility in automatic text generation. It's esp. useful for programmers to auto-generate a piece of well-formatted code. Look at the following example,

for[i,10]

Where 'for' is the name of the shorthand, '[' and ']' mark the beginning and end of the parameters. 'i' is the first parameter, '10' is the second parameter. Assume we have define its full text as,

for (int %1=0;%1<%2;%1++)\cr{\cr}\up\cr

%1, %2 represent the first and second parameter. In shorthand expansion, they'll be replaced by the actual values, which are "i" and "10" in the above example. You can have 9 parameters in total, i.e., %1 to %10. If you want to use a '%' symbol for its literal meaning, use '%%' instead. The special control symbols (\cr, \up) are to format the code block so that the final generated text looks like the following,

for (int i=0;i<10;i++)
{
     [Caret]
}

The caret will be located at the middle of two brackets ready for you to input the code contained the loop.