Special abbreviations exist to enable rapid entry of commonly used
commands. Emacs abbreviations are expanded by typing text into the
buffer and pressing <SPC> or <RET>. The special abbreviations
used to insert code templates all start with a ‘\’ (the backslash),
or, optionally, any other character set in
idlwave-abbrev-start-char. IDLWAVE ensures that abbreviations are
only expanded where they should be (i.e., not in a string or comment),
and permits the point to be moved after an abbreviation expansion:
very useful for positioning the mark inside of parentheses, etc.
Special abbreviations are pre-defined for code templates and other useful items. To visit the full list of abbreviations, use M-x idlwave-list-abbrevs.
You can easily add your own abbreviations or override existing
define-abbrev in your mode hook, using the
(add-hook 'idlwave-mode-hook (lambda () (idlwave-define-abbrev "wb" "widget_base()" (idlwave-keyword-abbrev 1)) (idlwave-define-abbrev "ine" "IF N_Elements() EQ 0 THEN" (idlwave-keyword-abbrev 11))))
Notice how the abbreviation (here wb) and its expansion
(widget_base()) are given as arguments, and the single argument to
idlwave-keyword-abbrev (here 1) specifies how far back to
move the point upon expansion (in this example, to put it between the
The abbreviations are expanded in upper or lower case, depending upon
idlwave-abbrev-change-case and, for reserved word
idlwave-reserved-word-upcase (see Case Changes).
A single character string used to start abbreviations in abbrev mode. Beware of common characters which might naturally occur in sequence with abbreviation strings.