Keyboard macros: Difference between revisions
Content added Content deleted
m (→{{header|Tcl}}) |
(Vedit macro language added) |
||
Line 40: | Line 40: | ||
} |
} |
||
bind . <Control-x><Control-c> {exit}</lang> |
bind . <Control-x><Control-c> {exit}</lang> |
||
=={{header|Vedit macro language}}== |
|||
<lang vedit> |
|||
// Configure a key to access menu item. |
|||
// The menu item may then contain the commands directly, or it may call a macro from disk. |
|||
// This has the advantage that the key binding is shown in the menu. |
|||
Key_Add("Shft-F6","[MENU]TV", OK) |
|||
// Configure a key to perform visual mode edit operations (similar to recorded key macro): |
|||
Key_Add("Numpad.Enter", "[CURSOR LEFT][LINE END][RETURN]", OK) |
|||
// Configure a key to execute macro language commands: |
|||
Key_Add("Numpad+", '[VISUAL EXIT] if(BB!=-1) { RCB(10,BB,BE) BB(-1) S("|@(10)",SET+CONFIRM) } else { S("",CONFIRM) }', OK) |
|||
// Configure a key to call a macro from disk. The old key assignment is not removed. |
|||
Key_Add("Ctrl-Shft-N",'[VISUAL EXIT] Call_File(100,"aspell.vdm","NEXT_ERROR")',INSERT+OK) |
|||
// Configure a two-key sequence (C-x C-c to save file). |
|||
Key_Add("^X C","[MENU]FS", OK) |
|||
// Remove a key assignment. If INSERT option was used when the key was assigned, the old assignment will come in effect again. |
|||
Key_Delete("Ctrl-Shft-N") |
|||
</lang> |