* * MACROS.QM: Miscellaneous short macros for use with QMAC or * in your keyboard definition file (QCONFIG.DAT). * * The exact behavior of some of these macros depends on the Insert * and Indent modes. Also, some of them get weird if you try to use * them on the last line of the file, because they try to cursor down * out of the file, which they can't. QEdit 2 makes it easy to clean * up after them, tho. :-) * * @c(opy) copies the char in the column above, then moves into the same * column on the lower line. It's very handy for working with tables, moving * columns of figures right, etc. @c MacroBegin GetPrev CursorLeft CursorDown * @d(up) copies the "word" at the cursor to the line below. It's real * handy for making sequential WriteLn(' commands, etc. @d MacroBegin MarkBlockBegin WordRight MarkBlockEnd WordLeft CursorDown CopyBlock UnmarkBlock * @g(obble) deletes the char at the cursor and moves down a line, staying in * the same column. It works real good for moving columns of figures left, etc. * It fails when the cursor is past the end of the line--it gobbles up the * end-of-line and joins the next line to the current one. @g MacroBegin DelCh CursorDown * @h(elp) reads my QCONFIG.DAT file into QEdit for use as a help file. I * prefer that to using QEdit's own help file capability, because I can * use QEdit's great search command to find what I need help on, and if I * wish I can reassign commands to different keys while I'm thinking * about it. (Note that the use of * comments in your .DAT file lets you * make it a complete help file.) A similar macro could be used to load * any particular text file that you had frequent use for. @h MacroBegin EditFile "c:\qedit\qconfig.dat" Return * @i(nsert) inserts spaces at the cursor, similar to the way @c acts. @i MacroBegin " " CursorLeft CursorDown * @m(acro) loads a macro file named MACROS.MAC from the current directory. * This lets me leave specialized macro files scattered around the disk, * for the applications particular to each subdirectory, then load them without * having to remember their names or type them it. @m MacroBegin MacroRead "macros.mac" Return * ^F2 reloads the current file from disk. Hit this key, and no matter * the state of the editing buffer, the original copy of this file will * be reloaded into the editor. DANGEROUS! * ^f2 MacroBegin "*" ToggleInsert "*" ToggleInsert EditFile CurrentFilename Return NewFile "N" Return * Here's a safer version: this one stops to let you answer the * "Save Changes?" prompt. You will have to hit RETURN to confirm the * reload of the file after hitting this key, though. * ^f3 MacroBegin EditFile CurrentFilename Return NewFile * * End of file *