home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / Pascal / BPASCAL.700 / D10 / UTILS.ZIP / BRIEF.TEM < prev    next >
Encoding:
Text File  |  1992-10-01  |  9.0 KB  |  334 lines

  1. /***********************************************************************
  2.  
  3.           Brief editor emulation for Borland/Turbo Pascal IDE.
  4.  
  5.     This file contains a Turbo Editor Macro Language (TEML) script 
  6. which emulates the Brief programmer's editor in the Borland/Turbo Pascal 
  7. IDE.  A complete description of the TEML language and the Turbo Editor 
  8. Macro Compiler (TEMC) can be found in the file "UTIL.DOC".
  9.  
  10.     The TEMC compiler can be invoked from the DOS command line as
  11. follows:
  12.  
  13.       temc [-c] brief.tem <IDE configuration file><.CMD><.TP>
  14.  
  15. The optional -c switch can also be specified as /c, and can appear in
  16. any argument position on the command line. If you use this option,
  17. any existing command table in your configuration file is thrown away
  18. before the script file is merged with those already defined. The
  19. configuration file extension must be specified as TEMC will modify both DOS
  20. and Windows IDEs config files.  Specify .CMD or .TP extentions for Windows
  21. or DOS IDE, respectively. If the .CMD file does not exist, it will be 
  22. created. The .TP file must exist, or an error is displayed.
  23.  
  24. Most of the simple Brief commands have been fully implemented.  Most
  25. of the complex commands have been either partially implemented or not
  26. implemented at all. Below is a list of the commands that have been
  27. fully or partially implemented.
  28.  
  29. IDE Binding   Brief Command              Comments
  30. -----------   ---------------             -------------------------
  31. F4            Close Window               Closes the current window
  32. F5            Search                     
  33. F6            Replace
  34. F10           Command                    Activates system menu
  35. Shift-F5      Search Backward            Repeats previous search
  36.                                          Option to go backward can be selected
  37. Shift-F6      Repeat Replace             Repeats previous replace
  38.                                          Option to go backward can be selected
  39. Ins           Paste Scrap                Pastes current clipboard selection
  40. Del           Delete                     Deletes current character only
  41. PgDn          Page Down
  42. PgUp          Page Up
  43. UpAr          Cursor Up
  44. DnAr          Cursor Down
  45. Star          Undo
  46. Plus          Copy to Scrap              Copies block to clipboard
  47. Minus         Cut to Scrap               Cuts block to clipboard
  48. Ctrl-D        Scroll Down
  49. Ctrl-E        Scroll Up
  50. Ctrl-G        Routines                   Activates the search menu
  51.                                          Find function can be selected here
  52. Ctrl-N        Next Error
  53. Ctrl-P        Error list                 Moves to previous error
  54. Ctrl-K        Delete To BOL              Deletes to beginning of line
  55. Ctrl-U        Redo
  56. Ctrl-W        Toggle Backup              Activates Options menu
  57.                                          Backup files can be toggled here
  58. Ctrl-F5       Case Sensitivity           Selects search dialog box
  59.                                          Case sensitivity can be toggled here
  60. Ctrl-F6       Toggle Regular Exp.        Selects search dialog box
  61.                                          Regular expressions can be toggled here
  62. Ctrl-bksp     Delete Prev Word
  63. Alt-A         Drop anchor                Sets beginning of block
  64. Alt-B         Buffer List                Lists ALL open windows
  65. Alt-C         Column mark                Sets beginning of *non-column* block
  66. Alt-D         Delete line
  67. Alt-E         Edit File
  68. Alt-G         Goto line                  Activates the search menu
  69.                                          Goto line can be selected here
  70. Alt-H         Help                       Context sensitive help
  71. Alt-I         Toggle Insert
  72. Alt-J+0       Goto BookMark(0)           Only marks 0-5 are supported
  73. Alt-J+1       Goto BookMark(1)             :
  74. Alt-J+2       Goto BookMark(2)             :
  75. Alt-J+3       Goto BookMark(3)             :
  76. Alt-J+4       Goto BookMark(4)             :
  77. Alt-J+5       Goto BookMark(5)           by this macro file
  78. Alt-K         Delete To EOL
  79. Alt-L         Mark Line
  80. Alt-M         Mark                       Sets beginning of block
  81. Alt-N         Next Buffer                Cycles to next open window
  82. Alt-O         New output file            Activates file menu
  83.                                          Save as... can be selected here
  84. Alt-P         Print Block
  85. Alt-Q         Quote                      Insert literal character
  86. Alt-R         Read Block
  87. Alt-S         Search
  88. Alt-T         Replace
  89. Alt-U         Undo
  90. Alt-V         Version                    Activates system menu
  91.                                          About can be selected here
  92. Alt-W         Write File
  93. Alt-X         Quit
  94. Alt-Z         DOS Shell                  Activates the file menu
  95.                                          OS Shell can be selected here
  96. Alt-0         Set BookMark(0)
  97. Alt-1         Set BookMark(1)
  98. Alt-2         Set BookMark(2)
  99. Alt-3         Set BookMark(3)
  100. Alt-4         Set BookMark(4)
  101. Alt-5         Set BookMark(5)
  102. Alt-F2        Zoom Window
  103. Alt-F5        Incremental Search         Prompts for search string
  104.                                          IDE does not support inc. search
  105. Alt-F6        Translate Backwards        Prompts for replace string
  106.                                          Option to go backward can be selected
  107. Alt-F10       Compile File
  108. Alt-BkSp      Delete Next Word
  109.  
  110. ****************************************************************/
  111.  
  112. /******* Macros ********/
  113.  
  114. MACRO MacScrollUp
  115.   ScrollScreenUp;
  116.   FixCursorPos;
  117. END;
  118.  
  119. MACRO MacScrollDown
  120.   ScrollScreenDown;
  121.   FixCursorPos;
  122. END;
  123.  
  124. MACRO MacPageUp
  125.   FixScreenPos;
  126.   PageScreenDown;
  127.   FixCursorPos;
  128. END;
  129.  
  130. MACRO MacPageDown
  131.   FixScreenPos;
  132.   PageScreenUp;
  133.   FixCursorPos;
  134. END;
  135.  
  136. MACRO MacDeleteLine
  137.   DeleteLine;
  138.   LeftOfLine;
  139. END;
  140.  
  141. MACRO MacTopOfScreen
  142.   SetPrevPos;
  143.   TopOfScreen;
  144. END;
  145.  
  146. MACRO MacBottomOfScreen
  147.   SetPrevPos;
  148.   BottomOfScreen;
  149. END;
  150.  
  151. MACRO MacHomeCursor
  152.   SetPrevPos;
  153.   HomeCursor;
  154. END;
  155.  
  156. MACRO MacEndCursor
  157.   SetPrevPos;
  158.   EndCursor;
  159. END;
  160.  
  161. MACRO MacOpenLine
  162.   RightOfLine;
  163.   LiteralChar(13);
  164. END;
  165.  
  166.  
  167. MACRO MacSetBlockBeg
  168.   HideBlock;
  169.   SetBlockBeg;
  170. END;
  171.  
  172. MACRO MacSetBlockEnd
  173.   HideBlock;
  174.   SetBlockEnd;
  175.   HighlightBlock;
  176. END;
  177.  
  178. MACRO MacMarkLine
  179.   HideBlock;
  180.   SetTempPos;
  181.   RightOfLine;
  182.   CursorCharRight;
  183.   SetBlockEnd;
  184.   CursorCharLeft;
  185.   LeftOfLine;
  186.   SetBlockBeg;
  187.   HighlightBlock;
  188.   MoveToTempPos;
  189. END;
  190.  
  191. MACRO MacMarkWord
  192.   HideBlock;
  193.   SetTempPos;
  194.   CursorRight;
  195.   WordLeft;
  196.   RightOfWord;
  197.   SetBlockEnd;
  198.   WordLeft;
  199.   SetBlockBeg;
  200.   HighlightBlock;
  201.   MoveToTempPos;
  202. END;
  203.  
  204. MACRO MacMoveToBlockBeg
  205.   SetPrevPos;
  206.   MoveToBlockBeg;
  207.   CenterFixScreenPos;
  208. END;
  209.  
  210. MACRO MacMoveToBlockEnd
  211.   SetPrevPos;
  212.   MoveToBlockEnd;
  213.   CenterFixScreenPos;
  214. END;
  215.  
  216. MACRO MacMoveToPrevPos
  217.   SwapPrevPos;
  218.   CenterFixScreenPos;
  219. END;
  220.  
  221. MACRO MacCopyBlock
  222.   CopyBlock;
  223.   HideBlock;
  224.   CenterFixScreenPos;
  225. END;
  226.  
  227. MACRO MacMoveBlock
  228.   MoveBlock;
  229.   HighlightBlock;
  230.   CenterFixScreenPos;
  231. END;
  232.  
  233. MACRO MacBreakLine
  234.   LiteralChar(13);
  235.   CursorCharLeft;
  236. END;
  237.  
  238. MACRO MacDeleteNextWord
  239.   WordRight;
  240.   MacMarkWord;
  241.   DeleteBlock;
  242.   CenterFixScreenPos;
  243. END;
  244.  
  245. MACRO MacDeletePrevWord
  246.   WordLeft;
  247.   MacMarkWord;
  248.   DeleteBlock;
  249.   CenterFixScreenPos;
  250. END;
  251.  
  252. MACRO MacDeleteToBOL
  253.   SetPrevPos;
  254.   LeftOfLine;
  255.   SetBlockBeg;
  256.   MoveToPrevPos;
  257.   SetBlockEnd;
  258.   DeleteBlock;
  259.   CenterFixScreenPos;
  260. END;
  261.  
  262. /******* Brief Key Bindings  ******/
  263.  
  264. F4        : CloseWindow;
  265. F5        : GetFindString;
  266. F6        : Replace;
  267. F10       : Menu;
  268.  
  269. Shift-F5  : RepeatSearch;
  270. Shift-F6  : RepeatSearch;
  271.  
  272. Ins       : ClipPaste;
  273. Del       : DeleteChar;
  274. PgDn      : MacPageDown;
  275. PgUp      : MacPageUp;
  276. UpAr      : CursorUp;
  277. DnAr      : CursorDown;
  278. Star      : Undo;
  279. Plus      : ClipCopy;
  280. Minus     : ClipCut;
  281.  
  282. Ctrl-D    : MacScrollDown;
  283. Ctrl-E    : MacScrollUp;
  284. Ctrl-G    : SearchMenu;
  285. Ctrl-N    : NextError;
  286. Ctrl-P    : PrevError;
  287. Ctrl-K    : MacDeleteToBOL;
  288. Ctrl-U    : Redo;
  289. Ctrl-W    : OptionsMenu;
  290. Ctrl-F5   : GetFindString;
  291. Ctrl-F6   : GetFindString;
  292. Ctrl-bksp : MacDeletePrevWord;
  293.  
  294. Alt-A     : SetBlockBeg;
  295. Alt-B     : WindowList;
  296. Alt-C     : MacSetBlockBeg;
  297. Alt-D     : MacDeleteLine;
  298. Alt-E     : OpenFile;
  299. Alt-G     : SearchMenu;
  300. Alt-H     : Help;
  301. Alt-I     : ToggleInsert;
  302. Alt-J+0   : MoveToMark(0);
  303. Alt-J+1   : MoveToMark(1);
  304. Alt-J+2   : MoveToMark(2);
  305. Alt-J+3   : MoveToMark(3);
  306. Alt-J+4   : MoveToMark(4);
  307. Alt-J+5   : MoveToMark(5);
  308. Alt-K     : DeleteToEOL;
  309. Alt-L     : MacMarkLine;
  310. Alt-M     : SetBlockBeg;
  311. Alt-N     : NextWindow;
  312. Alt-O     : FileMenu;
  313. Alt-P     : PrintBlock;
  314. Alt-Q     : LiteralChar;
  315. Alt-R     : ReadBlock;
  316. Alt-S     : GetFindString;
  317. Alt-T     : Replace;
  318. Alt-U     : Undo;
  319. Alt-V     : SystemMenu;
  320. Alt-W     : SaveFile;
  321. Alt-X     : Quit;
  322. Alt-Z     : FileMenu;
  323. Alt-0     : SetMark(0);
  324. Alt-1     : SetMark(1);
  325. Alt-2     : SetMark(2);
  326. Alt-3     : SetMark(3);
  327. Alt-4     : SetMark(4);
  328. Alt-5     : SetMark(5);
  329. Alt-F2    : ZoomWindow;
  330. Alt-F5    : GetFindString;
  331. Alt-F6    : GetFindString;
  332. Alt-F10   : CompileFile;
  333. Alt-BkSp  : MacDeleteNextWord;
  334.