The Semantic Recode minor mode enables a keymap and menu that provides simple access to different templates or template applications.
The key prefix is C-c /.
If the variable
srecode-takeover-INS-key is set, then the key
<insert> can also be used.
The most important key is bound to
srecode-insert which is
C-c / /, or insert insert. Quick Start.
Major keybindings are:
Insert a template whose name is typed into the minibuffer.
Reserved for direct binding of simple templates to keys using a keybinding command in the template file.
Reserved for template applications (Such as comment or get/set inserter.)
Edit the code of a template.
Insert template again. This will cause the previously inserted template to be inserted again.
By default, when inserting a template, if the user needs to enter text to fill in a part of the template, then the minibuffer is used to query for that information. SRecode also supports a field-editing mode that can be used instead. To enable it set:
Determine how to ask for a dictionary value when inserting a template. Only the ASK style inserter will query the user for a value. Dictionary value references that ask begin with the ? character. Possible values are:
Prompt in the minibuffer as the value is inserted.
Use the dictionary macro name as the inserted value, and place a field there. Matched fields change together.
NOTE: The field feature does not yet work with XEmacs.
Field editing mode is supported in newer versions of Emacs. You will not be prompted to fill in values while the template is inserted. Instead, short regions will be highlighted, and the cursor placed in a field. Typing in the field will then fill in the value. Several fields might be linked together. In that case, typing in one area will modify the other linked areas. Pressing TAB will move between editable fields in the template.
Once the cursor moves out of the are inserted by the template, all the fields are canceled.
NOTE: Some conveniences in templates, such as completion, or character restrictions are lost when using field editing mode.