Pauli's software ->Vedit resources -> C Tools -> Template Editing example

Template editing example

Here is an example of template editing on Vedit using my C123.VTM template editing macro. In this example, we write a for loop. Indenting mode 1 is used here.

1. Start typing the keyword. step 1
2. Press space. The keyword is expanded by adding parenthesis and an empty indented line. Cursor is moved inside the parethesis. step 2
3. Type the init statement for the for loop. step 3
4. When you type a semicolon, the other two statements are added automatically, using the variable name you entered. Cursor is moved ready for you to type the limit value (or to edit the equation if needed). step 4
5. After the for loop statements are ready, just press the down arrow and start typing the statements inside the loop. The line is already indented. Subsequent lines will be indented by the Vedit auto indent mode. Note: the loop variable is stored in register 9 for easy access. step 5