home *** CD-ROM | disk | FTP | other *** search
/ Mega Top 1 / os2_top1.zip / os2_top1 / APPS / EDITORS / EHP12 / EHP.INF (.txt) < prev    next >
OS/2 Help File  |  1993-10-29  |  53KB  |  1,552 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Introduction ΓòÉΓòÉΓòÉ
  3.  
  4. The shortcut EHP comes from "Editor for HP workstation" and was invented during 
  5. the first implementation on a HP 350. This first implementation was done by 
  6. Maximilian Riesenhuber and me during 1990. Since then EHP has gone its way via 
  7. DOS to OS/2. Of course the name remains only for historical reasons, since it 
  8. has no real meaning for the editor now running with OS/2. 
  9.  
  10. EHP is an interactive fullscreen text editor allowing quasi-parallel editing of 
  11. multiple texts using window technique. 3-button mouse support is provided (of 
  12. course only, if a 3-button mouse driver is installed). 
  13.  
  14. Compared with the UNIX vi, EHP does not distinguish an edit- and a command 
  15. mode. Instead, the control- and the alt-keys are used for invoking commands. 
  16.  
  17. In the sequel all available commands will be listed in a semantic grouping. For 
  18. a command reference see Command reference in the apppendix. 
  19.  
  20. Note, that when this document speaks about a 'screen', and you are running EHP 
  21. in an OS/2 PM window, then screen means this window. Don't intermix PM windows 
  22. with EHP windows! 
  23.  
  24. Note, that the following words are sometimes used as synonyms: 
  25.  
  26. o RETURN and ENTER 
  27.  
  28. o Space and blank 
  29.  
  30. o Tab and tabstop 
  31.  
  32.  
  33. ΓòÉΓòÉΓòÉ 2. Installing EHP ΓòÉΓòÉΓòÉ
  34.  
  35. The installation of EHP is quite simple. Place the file EHP.EXE in a directory 
  36. contained in your PATH, e.g. c:\os2\bin. Place the keyboard definition file 
  37. tasten.inf in a directory of your choice, say also c:\os2\bin. Edit your 
  38. CONFIG.SYS file and insert the line SET EHPINIT=c:\os2\bin\tasten.inf. This 
  39. forwards the path of the keyboard file to EHP. For further settings via EHPINIT 
  40. see EHPINIT. Further, the dynamic link library EMX.DLL must be in a directory 
  41. contained in your LIBPATH. 
  42.  
  43.  
  44. ΓòÉΓòÉΓòÉ 3. General information ΓòÉΓòÉΓòÉ
  45.  
  46. This section contains information about invoking EHP, the contents of the 
  47. screen, user interaction and accepted fileformats. 
  48.  
  49.  
  50. ΓòÉΓòÉΓòÉ 3.1. Invoking EHP ΓòÉΓòÉΓòÉ
  51.  
  52. Precondition for invoking EHP is the correct installation of EHP. If this is 
  53. done, you can start the editor by typing ehp at the command prompt. You can 
  54. provide the names of files to load as parameters. E.g. the command 
  55.  
  56. ehp x y z 
  57.  
  58. loads the files x, y and z each into a seperate window. The window displayed on 
  59. top of the others is the one named first, in this case x, since files are 
  60. loaded in reverse order, and each newly opened window becomes the top window. 
  61. Note, that the numbering of the windows is also in reverse order. The numbering 
  62. can be used to switch among the windows. 
  63.  
  64. If no parameters were provided, EHP looks for a configuration file. If such a 
  65. file exists, the editor is restored in the state it was in when quitting it 
  66. before. Otherwise you are asked for the name of a file to load. If a file with 
  67. that name does not exist, you are asked whether you want to create it. If so, a 
  68. new empty file is presented. Otherwise the editor terminates with a 
  69. corresponding message. 
  70.  
  71.  
  72. ΓòÉΓòÉΓòÉ 3.2. Screen contents ΓòÉΓòÉΓòÉ
  73.  
  74. This section describes the outfit of windows, the position and the contents of 
  75. the status line and the colors. 
  76.  
  77.  
  78. ΓòÉΓòÉΓòÉ 3.2.1. Windows ΓòÉΓòÉΓòÉ
  79.  
  80. A window is a rectangular part of the screen, on which text is presented in a 
  81. frame. Since it is possible to look at multiple windows at the same time, the 
  82. current window's frame is highlighted. The frame contains helpful information 
  83. and control areas for the mouse. 
  84.  
  85.  
  86. Headline 
  87.  
  88. In the headline you find the current line and column number, information about 
  89. insert/overwrite (Insert or Overwrite), underline (Under), autoindent (Indent), 
  90. shell (SHELL) and tab (Tabs or Spcs) mode. 
  91.  
  92.  
  93. Footline 
  94.  
  95. In the footline the window number and the filename are displayed. If the file 
  96. is read only, then WRITEPROTECTED is displayed. If the file was modified after 
  97. loading or after the last saving, then MODIFIED is displayed in the footline. 
  98. Such modified files are saved when quitting the editor with the save option (of 
  99. course only, if the file was not write protected). 
  100.  
  101.  
  102. ΓòÉΓòÉΓòÉ 3.2.2. Status line ΓòÉΓòÉΓòÉ
  103.  
  104. The status line is the bottom line of the screen. Here the helptexts for the 
  105. keycommands and error messages are displayed. 
  106.  
  107.  
  108. ΓòÉΓòÉΓòÉ 3.2.3. Colors ΓòÉΓòÉΓòÉ
  109.  
  110. The default color setting is the following: 
  111.  
  112. o Grey 
  113.  
  114.   This is the color normal text and frames of inactive windows appear in. 
  115.  
  116. o Green 
  117.  
  118.   Highlighted blocks and the frame of the current window appear green. 
  119.  
  120. o Red 
  121.  
  122.   With red underlined text passages are displayed. 
  123.  
  124. o Brown 
  125.  
  126.   If underlined text appears in a highlighted block, it is colored brown. 
  127.  
  128.  
  129. ΓòÉΓòÉΓòÉ 3.3. Interaction ΓòÉΓòÉΓòÉ
  130.  
  131. An input consisting of more than one letter (except the key commands) has to be 
  132. terminated with the ENTER-key. This are for example filenames or line numbers. 
  133. If EHP expects exactly one letter (for example in a yes/no query), pressing the 
  134. letter suffices and pressing ENTER is not needed. 
  135.  
  136. Error messages, which are displayed in the status line must be confirmed with 
  137. ENTER. If a hint is displayed in the status line, e.g. the new status of the 
  138. the status of a binary variable, like the blockhighlighting status, this hint 
  139. will disappear automatically after a couple of seconds. 
  140.  
  141. The keyboard commands are case sensitive. That means, if e.g. in the command 
  142. reference there is a command CTRL-x n then you have to use a lower-case n. 
  143. Note, that hence having Caps Lock activated accidently will cause troubles in 
  144. executing commands. 
  145.  
  146.  
  147. ΓòÉΓòÉΓòÉ 3.4. Fileformat ΓòÉΓòÉΓòÉ
  148.  
  149. The files to edit must be in ASCII format. With OS/2 the size of texts is 
  150. limited to some GB, which will satisfy most needs and will exceed swap space in 
  151. most cases. However, if a file should still be too large to load, an error 
  152. message will be displayed. 
  153.  
  154. If lines longer than 500 characters appear, they will be wrapped (see also 
  155. Limits and bugs). The limit on the number of lines is 4G due to the limit of 
  156. integers, but this has no effect, since memory limits are more strict. 
  157.  
  158. Note, that binary files should not be edited with EHP, since e.g. tabs are 
  159. expanded during load, and are only recompressed at the beginning of a line 
  160. (important for tools like MAKE). This could lead to an unexpected and 
  161. unpleasant change in representation. 
  162.  
  163. A combination of an underscore followed by a backspace and a character is 
  164. interpreted as if that character is underlined. Characters entered in EHP's 
  165. underline mode are written to file in the same representation. Due to this 
  166. representation, if manually an underscore followed by a backspace (entered via 
  167. CTRL-c Backspace) is inserted before a character, this character will appear 
  168. underlined in the sequel. This is also true for an underscore-backspace 
  169. combination entered at the end of a line, which will be converted into an 
  170. underlined space. 
  171.  
  172.  
  173. ΓòÉΓòÉΓòÉ 4. Commands ΓòÉΓòÉΓòÉ
  174.  
  175. The keyboard mapping for commands was chosen in a way that key combinations can 
  176. be remembered as easily as possible. However, a compromise had to be found 
  177. between shortness of commands and the mnemonic property. So for heavily used 
  178. commands sometimes in the predefined keyboard mapping a somewhat cryptical 
  179. combination has been chosen to speed up everyday's work (e.g. CTRL-t for 
  180. 'delete word'). 
  181.  
  182. The key combinations for invoking the commands may be changed by using the 
  183. withcoming tool KM, explained below (see Keyboard remapping). 
  184.  
  185. Note, that if typing an illegal combination, all typed keys belonging to the 
  186. current command are discarded up to and including the one causing the sequence 
  187. to be illegal. Say for example you wanted to type the command for deleting a 
  188. block (CTRL-b d) but you hit s instead of d, then the CTRL-b and the s are 
  189. discarded. This can of course be used as a kind of escape facility. E.g. the 
  190. spacebar is currently not assigned any command. So pressing SPACE escapes from 
  191. a multi-key command. 
  192.  
  193.  
  194. ΓòÉΓòÉΓòÉ 4.1. Moving text and cursor ΓòÉΓòÉΓòÉ
  195.  
  196.  
  197. ΓòÉΓòÉΓòÉ 4.1.1. Change cursorposition ΓòÉΓòÉΓòÉ
  198.  
  199. In order to position the cursor there are many commands. All have in common 
  200. that they can't move the cursor beyond the last line of the text and beyond 
  201. column 501 (see Limits and Bugs). If the cursor would move out of the window, 
  202. the text is scrolled accordingly. 
  203.  
  204. The following sections will describe the single commands in detail. 
  205. Character oriented 
  206.  
  207. o Arrow-left 
  208.  
  209.   moves the cursor one column left, if not already in column 1. 
  210.  
  211. o Arrow-right 
  212.  
  213.   moves the cursor one column right, if not already in column 501. 
  214.  
  215. Word oriented 
  216.  
  217. Word separator are the following characters: .,#:;]@$&()[]{}!?'`/\<>-+*=" in 
  218. addition to TAB, SPACE and a line break. 
  219.  
  220. o CTRL-Arrow left 
  221.  
  222.   moves the cursor one word left, if not already at the beginning of the line. 
  223.  
  224. o CTRL-Arrow right 
  225.  
  226.   moves the cursor one word right, if not already at the last word of the line. 
  227.  
  228. Line oriented 
  229.  
  230. o Home 
  231.  
  232.   moves cursor to the beginning of the current line. 
  233.  
  234. o End 
  235.  
  236.   moves cursor to the end of the current line. 
  237.  
  238. o Arrow up 
  239.  
  240.   moves cursor up one line, if not already in first line of current file. 
  241.  
  242. o Arrow down 
  243.  
  244.   moves cursor down one line, if not already in last line of current file. 
  245.  
  246. o ENTER (in overwrite mode, see Insert and delete) 
  247.  
  248.   moves cursor to the beginning of the following line, if the current line is 
  249.   not the last line of the current file. 
  250.  
  251. Window oriented 
  252.  
  253. o CTRL-Home 
  254.  
  255.   moves the cursor to the top of the current window. Note that this need not be 
  256.   the first line of the file. 
  257.  
  258. o ALT-Arrow right 
  259.  
  260.   move the cursor to the middle line of the current window. 
  261.  
  262. o CTRL-End 
  263.  
  264.   moves the cursor to the bottom of the current window. Note that this need not 
  265.   be the last line of the current file. 
  266.  
  267.  
  268. ΓòÉΓòÉΓòÉ 4.1.2. Change window contents ΓòÉΓòÉΓòÉ
  269.  
  270.  
  271. Line oriented 
  272.  
  273. o ALT-Arrow up 
  274.  
  275.   makes current line the top line of the current window. 
  276.  
  277. o ALT-Arrow left 
  278.  
  279.   makes current line the middle line of the current window. 
  280.  
  281. o ALT-Arrow down 
  282.  
  283.   makes current line the bottom line of the current window. 
  284.  
  285. o CTRL-Arrow up 
  286.  
  287.   moves window content up one line, if the current line is not the last line of 
  288.   the current file and is located at the top of the window. The cursor stays in 
  289.   the same line number, if it was not in the top line of the window. If the 
  290.   latter was the case, then it is moved down to the next line. That means it 
  291.   stays on the same screen position in that case. 
  292.  
  293. o CTRL-Arrow down 
  294.  
  295.   moves window content down one line, if the first line on the current file is 
  296.   not already visible in the window. The cursor stays in the same line number, 
  297.   if it was not in the bottom line of the window. If the latter was the case, 
  298.   then it is moved up to the next line. That means it stays on the same screen 
  299.   position in that case. 
  300.  
  301. Page oriented 
  302.  
  303. o PgUp 
  304.  
  305.   scrolls up one page, if not already at the beginning of the file. The 
  306.   direction is hence towards smaller line numbers. 
  307.  
  308. o PgDn 
  309.  
  310.   scrolls down one page, if not already at the end of the file. The direction 
  311.   is hence towards greater line numbers. 
  312.  
  313. o ALT-PgUp 
  314.  
  315.   sctolls up half a page, if not already at the beginning of the file. The 
  316.   direction is hence towards smaller line numbers. 
  317.  
  318. o ALT-PgDn 
  319.  
  320.   scrolls down half a page, if not already at the end of the file. The 
  321.   direction is hence towards greater line numbers. 
  322.  
  323.  
  324. ΓòÉΓòÉΓòÉ 4.1.3. Absolute jumps ΓòÉΓòÉΓòÉ
  325.  
  326. o CTRL-PgUp 
  327.  
  328.   moves the cursor to the first line of the current file. 
  329.  
  330. o CTRL-PgDn 
  331.  
  332.   moves the cursor to the last line of the current file. 
  333.  
  334. o CTRL-g n 
  335.  
  336.   go to a specific line number. The query for the line number is displayed in 
  337.   the status line. 
  338.  
  339. o CTRL-g b 
  340.  
  341.   moves cursor to the beginning of the block marked in the current window. If 
  342.   no block is marked in the current window, then the corsorposition remains 
  343.   unchanged. 
  344.  
  345. o CTRL-g e 
  346.  
  347.   moves cursor to the end of the block marked in the current window. If no 
  348.   block is marked in the current window, then the corsorposition remains 
  349.   unchanged. 
  350.  
  351. o CTRL-g l 
  352.  
  353.   move the cursor to the so-called 'last position'. This position is saved, 
  354.   when a jump to the beginning or the end of a file, a search, a replace or any 
  355.   of the CTRL-g commands is performed. By the latter it is possible to jump 
  356.   back and forth between two positions by repeatedly doing CTRL-g l. 
  357.  
  358. o Left mouse button 
  359.  
  360.   By moving the mouse pointer to a suitable position and pressing the left 
  361.   mouse button once, the cursor is moved to the mouse position. Note, that this 
  362.   also works, if the mouse pointer is located outsinde the current window (see 
  363.   window switching). 
  364.  
  365.  
  366. ΓòÉΓòÉΓòÉ 4.1.4. Marker ΓòÉΓòÉΓòÉ
  367.  
  368. There is a total of ten markers which may be set anywhere in open windows. 
  369. Markers are global, which means, that a marker not only contains the cursor 
  370. line and column, but also the window index. This may be helpful for performing 
  371. fast window switching, since of course the window of the marker jumped to is 
  372. made to be the current window. 
  373.  
  374. o CTRL-g s <n> 
  375.  
  376.   sets marker number <n> at the current position. 
  377.  
  378. o CTRL-g g <n> 
  379.  
  380.   goes to marker number <n> and activates the corresponding window. 
  381.  
  382.  
  383. ΓòÉΓòÉΓòÉ 4.2. File operations ΓòÉΓòÉΓòÉ
  384.  
  385. The following operations always refer to the current window and to the whole 
  386. file in the window. 
  387.  
  388. o CTRL-e l 
  389.  
  390.   loads a file into the current window. The file in the current window, and all 
  391.   unsaved changes applied to it, are discarded after a security query. The name 
  392.   of the file to load is asked for in the status line. If a file with that name 
  393.   is already contained in another open window, then this is announced and one 
  394.   can choose to edit that window or nevertheless load the file in the current 
  395.   window. Note, that the latter causes two possibly different copies of the 
  396.   same file to be held in EHP, which could lead to loss of changes. 
  397.  
  398. o CTRL-e s 
  399.  
  400.   saves the file contained in the current window. If the backupoption is 
  401.   activated, the file, which would be going to be overwritten, gets the 
  402.   extension '.bak'. File attributes (system, hidden etc.) remain as they were 
  403.   when loading the file. New files are created as non-system, non-hidden and 
  404.   writeable. 
  405.  
  406. o CTRL-e r 
  407.  
  408.   renames the file and saves it under the new name. The new file name is asked 
  409.   for in the status line. Note, that the file with the old name is not deleted. 
  410.   Subsequent saving causes the file to be saved with the new name. 
  411.  
  412.  
  413. ΓòÉΓòÉΓòÉ 4.3. Block operations ΓòÉΓòÉΓòÉ
  414.  
  415. EHP offers a great variety of block commands. It is important to know, that EHP 
  416. supports two kinds of blocks. There are the so-called rectangular blocks. They 
  417. are defined by marking the upper left corner and the character right to the 
  418. lower right corner. The rectangular field between is the block. These blocks 
  419. are nice to move parts of tables or comments in a program. 
  420.  
  421. The second block kind is the so-called normal block. One marks the first 
  422. character and the character right to the last character. All the text between 
  423. (with line wrapping etc.) belongs to the block. These blocks are good for 
  424. moving whole paragraphs or parts of paragraphs. 
  425.  
  426.  
  427. ΓòÉΓòÉΓòÉ 4.3.1. Updating of block boundaries ΓòÉΓòÉΓòÉ
  428.  
  429. When inserting lines before a block, then the beginning and the end of the 
  430. block are moved correspondingly. So the text does not move through the block, 
  431. but the marked block moves and the block contents stay the same. When a line is 
  432. inserted within the block, then the block end moves one line down. When 
  433. characters are inserted or deleted within a block, then the resulting block 
  434. changes depend on the block kind. 
  435.  
  436. For normal blocks if the character was inserted/deleted in the last block line 
  437. (i.e. the block end is on the current line), then the block end moves 
  438. right/left one position. 
  439.  
  440. For rectangular blocks the block remains rectangular with the same width all 
  441. the time. That means, that characters may be moved outside/into the block. 
  442.  
  443.  
  444. ΓòÉΓòÉΓòÉ 4.3.2. Blockhighlighting ΓòÉΓòÉΓòÉ
  445.  
  446. If a block was correctly marked, i.e. the block end comes after the block 
  447. beginning (though you can mark them in any order) and the blockhighlighting is 
  448. activated, then the block is displayed in a color different from the standard 
  449. text color. The blockhighlighting can also be turned off via the environment 
  450. variable EHPINIT. 
  451.  
  452.  
  453. ΓòÉΓòÉΓòÉ 4.3.3. Block oriented commands ΓòÉΓòÉΓòÉ
  454.  
  455. Note, that the following commands perform actions on blocks local to the 
  456. current window except the commands 'Cut' and 'Paste'. Only with these two 
  457. commands it is possible to move blocks between windows. 
  458.  
  459. o CTRL-b b 
  460.  
  461.   marks the beginning of a block. The character the cursor is on is the first 
  462.   one belonging to the block. 
  463.  
  464. o CTRL-b n 
  465.  
  466.   marks the end of a normal block. The current character is the first one not 
  467.   belonging to the block. 
  468.  
  469. o CTRL-b r 
  470.  
  471.   marks the end of a rectangular block. The current character is the first one 
  472.   not belonging to the block. 
  473.  
  474. o CTRL-b u 
  475.  
  476.   unmarks the block. That means, that block beginning and block end are 
  477.   unmarked and that, if it was activated, the blockhighlighting disappears. 
  478.  
  479. o CTRL-b c 
  480.  
  481.   copies the marked block to the current cursor position. The block is 
  482.   inserted, so no characters are overwritten. In case of a rectangular block a 
  483.   check is performed, if insertion of the block does not collide with the 
  484.   maximum line length. If it does, then the block is not inserted. If no block 
  485.   was marked, nothing happens. 
  486.  
  487. o CTRL-b m 
  488.  
  489.   moves the marked block to the cursor position. As with copying, a check is 
  490.   done to see, if a rectangular block does not collide with the maximum line 
  491.   length, if inserted at the cursor position. It is not moved, if it does 
  492.   collide. If no block was marked, nothing happens. 
  493.  
  494. o CTRL-b d 
  495.  
  496.   deletes the marked block. Note, that there is no undo feature for this up to 
  497.   now. So be careful with that command. 
  498.  
  499. o CTRL-b i 
  500.  
  501.   indents the block by a certain amount of columns to the right or left. The 
  502.   number of columns is queried in the status line. Providing a positive number 
  503.   shifts the block to the right, a negative number to the left. Note, that a 
  504.   negative number with an absolute value greater than the maximum number of 
  505.   leading spaces in the block leads to loss of characters in such lines, since 
  506.   they are shifted 'outside the window'. All block lines including block 
  507.   starting line and block ending line are shifted, except when the block end is 
  508.   on the first column of a line. Then this line is not shifted left, since no 
  509.   character of that line belongs to the block. 
  510.  
  511. o CTRL-b r 
  512.  
  513.   reads a file, of which the name is asked for in the status line and inserts 
  514.   it at the cursor position. The file contents are marked as a normal block. 
  515.  
  516. o CTRL-b w 
  517.  
  518.   writes the marked block to a file, of which the name is asked for in the 
  519.   status line. This works for normal and rectangular blocks. 
  520.  
  521. o CTRL-b f 
  522.  
  523.   passes the block contents to an external filter (e.g. SORT), deletes the 
  524.   block and inserts the filter outputs as a new block at the position of the 
  525.   old one. If the filter returns with a non-zero value, one can decide, whether 
  526.   the results should nevertheless be inserted as block or if they should be 
  527.   discarded. The former can be useful for programs, which are known to return 
  528.   non-zero values even if no error occurred. 
  529.  
  530.   Note, that the name of the used filter serves as default for the next call. 
  531.   Thus the previously used filter name is displayed in the prompt for the new 
  532.   filter name. If one wants to use the default, one just has to press ENTER 
  533.   without providing the filter name. 
  534.  
  535. o CTRL-b t 
  536.  
  537.   cuts the block. This is not a cut in the common sense, since it has become a 
  538.   standard for cut operations to delete the cutted part. This cut only copies 
  539.   the marked block into the so-called 'paste buffer'. The contents of the paste 
  540.   buffer can be inserted in any window, as described in the sequel. 
  541.  
  542. o CTRL-b p 
  543.  
  544.   pastes the contents of the paste buffer into the current window at the cursor 
  545.   position. To do this, one previously has to cut a block with the CTRL-b p 
  546.   command. The paste buffer is not emptied by this command. Hence one can 
  547.   repeatedly insert the same block by iterating the command. 
  548.  
  549. o Left mouse button with moving 
  550.  
  551.   By pressing the left mouse button on the first block character and releasing 
  552.   it on the first non-block character, one marks a normal block. 
  553.  
  554. o Right mouse button with moving 
  555.  
  556.   By pressing the right mouse button on the first block character and releasing 
  557.   it on the first non-block character, one marks a rectangular block. 
  558.  
  559. o Clicking the right mouse button 
  560.  
  561.   has two functions depending on whether a block is marked in the current 
  562.   window and whether a block is contained in the paste buffer. If a block is 
  563.   marked in the current window, then the cut command is performed, storing the 
  564.   block in the paste buffer. In addition the block is unmarked. 
  565.  
  566.   If no block is marked in the current window, but the paste buffer is not 
  567.   empty, then the paste buffer contents are inserted at the mouse position 
  568.   (corresponds to the paste command). If the paste buffer is empty, only the 
  569.   cursor is positioned at the mouse position. 
  570.  
  571. o Middle mouse button with left mouse button 
  572.  
  573.   If the middle mouse button is held down and then the left button is pressed, 
  574.   a block marked in the current window is moved to the mouse position. If no 
  575.   block was marked in the current window, nothing happens. 
  576.  
  577. o Middle mouse button with right mouse button 
  578.  
  579.   If the middle mouse button is held down and then the right button is pressed, 
  580.   a block marked in the current window is deleted. If no block was marked in 
  581.   the current window, nothing happens. 
  582.  
  583.  
  584. ΓòÉΓòÉΓòÉ 4.4. Window commands ΓòÉΓòÉΓòÉ
  585.  
  586. The most obvious feature of EHP is the possibility to edit multiple texts quasi 
  587. simultaneously by using windows. The editor functions for the use of windows 
  588. are explained below. 
  589.  
  590.  
  591. ΓòÉΓòÉΓòÉ 4.5. Window switching ΓòÉΓòÉΓòÉ
  592.  
  593. o CTRL-w p 
  594.  
  595.   makes the window which was previously active become the current window. 
  596.   Successively using CTRL-w p thus jumps back and forth between two windows. 
  597.  
  598. o CTRL-w n 
  599.  
  600.   makes the next window the current one (whatever 'next' will be). Only one 
  601.   this about 'next' is asserted: one can use it to cycle through all opened 
  602.   windows. 
  603.  
  604. o CTRL-w d 
  605.  
  606.   makes a window containing a certain file become the current window. The file 
  607.   name must be entered in the status line after issuing the command. If no file 
  608.   with the desired name is in any window, one gets the option to load the 
  609.   specified file into a new window. 
  610.  
  611. o CTRL-w i 
  612.  
  613.   makes the window with a certain number the current window. The window number 
  614.   is queried in the status line. If a window with the specified number does not 
  615.   exist, an error message is displayed. 
  616.  
  617. o Left mouse button 
  618.  
  619.   By clicking with the left mouse button, the window on which the mouse points 
  620.   becomes the current window and the cursor is placed on the mouse position 
  621.   (except the window frame was hit). 
  622.  
  623.  
  624. ΓòÉΓòÉΓòÉ 4.5.1. Changing size and position ΓòÉΓòÉΓòÉ
  625.  
  626. The size and position of each window can be changed either by using the 
  627. corresponding key commands or by using the mouse. In general it is advisable to 
  628. use the mouse. Key commands for that take some time to get used to... 
  629.  
  630. o CTRL-w s 
  631.  
  632.   leads to a mode where you can use the cursor keys to resize the current 
  633.   window. Only the corners of the window frame are displayed. Cursor keys move 
  634.   the lower right corner. Hitting ENTER confirms the chosen size. 
  635.  
  636.   By pressing 's' during adjustment one can toggle the stepwidth between 5 and 
  637.   1. 
  638.  
  639. o CTRL-w m 
  640.  
  641.   leads to a mode, in which the position of the current window can be changed. 
  642.   The whole window, of which only the corners are displayed during movement, 
  643.   can be moved via the cursor keys. As in resizing, pressing 's' toggles the 
  644.   stepwidth between 5 and 1. 
  645.  
  646. o CTRL-w t 
  647.  
  648.   EHP stores two positions for each window. When a window is opened, both are 
  649.   set to full size. When you now move or resize the window, the second stored 
  650.   size/position remains unchanged. You can switch between these two 
  651.   sizes/positions by using this command. Of course the second position remains 
  652.   only as long full screen as you don't change it. It is thus possible to work 
  653.   with two size/position pairs which are both non-fullscreen. 
  654.  
  655. o Left mouse button on lower right corner 
  656.  
  657.   By pressing the left mouse button on the lower right window corner and 
  658.   holding it down, one can resize the window by moving the mouse with the left 
  659.   button pressed. As when changing window position by key commands, the window 
  660.   size is indicated only by its four corners. Releasing the button confirms the 
  661.   chosen size. 
  662.  
  663. o Left mouse button on upper window border 
  664.  
  665.   By pressing the left mouse button on the top window border and holding it 
  666.   down, one can move the window by moving the mouse with the left button 
  667.   pressed. As when changing window position by key commands, the window 
  668.   position is indicated only by its four corners. Releasing the button confirms 
  669.   the chosen position. 
  670.  
  671. o Left mouse button on upper right corner 
  672.  
  673.   By pressing the left mouse button on the upper right window corner and 
  674.   holding it down, one can switch between the two window sizes. This 
  675.   corresponds to the key command CTRL-w t. 
  676.  
  677.  
  678. ΓòÉΓòÉΓòÉ 4.5.2. Open and close windows ΓòÉΓòÉΓòÉ
  679.  
  680. EHP allows to have as many windows open simultaneously, as there are 32-bit 
  681. integers (though this limit may be somewhat theoretically, since memory limits 
  682. will be much more severe. 
  683.  
  684. o CTRL-w o 
  685.  
  686.   asks for the file name in the status line and loads the named file into a new 
  687.   window. If the file is already in an open window, EHP asks, whether it is 
  688.   desired to switch to that window instead of opening a new one. 
  689.  
  690.   The newly opened window is assigned the smallest free window number and both 
  691.   window sizes are set to the size of the screen. The cursor is placed in the 
  692.   first line and the first column and autoindent is activated, if specified in 
  693.   EHPINIT. The tab-compression is activated by default. The tab length is set 
  694.   to the default 8, if not specified different by command or via EHPINIT. The 
  695.   window is put to insert mode by default and underlining is turned off. Shell 
  696.   mode is deactivated by default. 
  697.  
  698. o CTRL-w c 
  699.  
  700.   closes the current window. If changes were made to the text (indicated by 
  701.   MODIFIED in the bottom frame border), a confirmation is requested, avoiding 
  702.   accidental loss of changes. 
  703.  
  704.  
  705. ΓòÉΓòÉΓòÉ 4.6. Insert and delete ΓòÉΓòÉΓòÉ
  706.  
  707. EHP distinguishs the insert mode and the overwrite mode. The mode is local to 
  708. each window and is indicated in the top frame border (Insert or Overwrt). If in 
  709. insert mode, typed characters are inserted in the text, in overwrite mode 
  710. existing characters are overwritten. In order to switch between modes, use the 
  711. following: 
  712.  
  713. o Ins 
  714.  
  715.   toggles between insert and overwrite mode 
  716.  
  717. o Del 
  718.  
  719.   deletes the current character (the one the cursor is on). If there are 
  720.   characters to the right of the cursor, they are pulled left one position. If 
  721.   the cursor was right of the end of the line, hitting Del causes the current 
  722.   line to be joined with the subsequent one (see also CTRL-j described below). 
  723.  
  724. o Backspace 
  725.  
  726.   deletes the character left to the cursor. Characters to the right of the 
  727.   cursor including the one the cursor is on are pulled left one position. If 
  728.   the cursor was on the first column of a line, then the current line is joined 
  729.   with the line above, provided that the current line was not the first line of 
  730.   the current file. See also CTRL-j described below for joining lines. 
  731.  
  732. o CTRL-y 
  733.  
  734.   deletes the current line. It can be restored with CTRL-k as described below. 
  735.  
  736. o CTRL-k 
  737.  
  738.   inserts the last deleted line before the current line. 
  739.  
  740. o CTRL-q 
  741.  
  742.   deletes from the cursor to the right up to the end of the line including the 
  743.   current character. 
  744.  
  745. o CTRL-a 
  746.  
  747.   inserts an empty line at the current cursor position. The current line is 
  748.   thus moved down one line. If autoindent is active, then the cursor is 
  749.   indented accoring to the current line. That means, if e.g. the current line 
  750.   starts with 5 blanks and CTRL-a is performed with autoindent active, then the 
  751.   cursor is positioned in column 6 of the inserted line. 
  752.  
  753. o CTRL-o 
  754.  
  755.   inserts a line below the current line. If autoindent is active, then the 
  756.   cursor is indented according to the current line. That means, if e.g. the 
  757.   current line starts with 5 blanks and CTRL-a is performed with autoindent 
  758.   active, then the cursor is positioned in column 6 of the inserted line. 
  759.  
  760. o ENTER  cursor position and the part from the cursor to the right is placed in 
  761.   the inserted line. If in overwrite mode, then the cursor is placed in the 
  762.   first column of the next line, if the current line is not the last line in 
  763.   the file. No line is inserted in overwrite mode. 
  764.  
  765. o CTRL-j 
  766.  
  767.   joins the current line with the subsequent line. First the cursor is placed 
  768.   two characters behind the end of the current line. Then the following line is 
  769.   moved to the cursor position, if the length of the line doesn't exceed 500 
  770.   characters (see Limits and Bugs). While doing this, leading blanks are 
  771.   removed from the line moved to the corsor position. So, there remains exactly 
  772.   one blank character between the current line and the following line. 
  773.  
  774.   Note the funny feature, that CTRL-ENTER is equal to CTRL-j under OS/2 and 
  775.   thus invokes the joining of lines. 
  776.  
  777.  
  778. ΓòÉΓòÉΓòÉ 4.7. Find and replace ΓòÉΓòÉΓòÉ
  779.  
  780. Searching with EHP supports regular expressions for matching patterns. All 
  781. expressions available with grep should work with EHP, too. If there is much 
  782. searching done on special characters like '[' or '.', then regular expressions 
  783. might slow down work and can therefore be turned off by using EHPINIT or by 
  784. command (see Miscellaneous for a description of the command) or by option when 
  785. doing the search. 
  786.  
  787.  
  788. ΓòÉΓòÉΓòÉ 4.7.1. Regular expressions ΓòÉΓòÉΓòÉ
  789.  
  790. Regular expression pattern matching is done with the GNU REGEX package. Thus 
  791. the recognized expressions should be the same as with grep. The most important 
  792. regular expression rules will now be summarized. Note, that 'X' stands for an 
  793. arbitrary regular expression. 
  794.  
  795. Pattern   matches 
  796.  
  797. non-special character Each non-special character builds a basic regular 
  798.           expression. 
  799.  
  800. . (dot)   matches any character. 
  801.  
  802. \(X\)     groups the expression X. May be used nested. 
  803.  
  804. \n        where n is a number, refers to the n-th group. Groups are numbered in 
  805.           increasing order depending on the position of the left group 
  806.           parenthesis from left to right. The \n refers to the text matched by 
  807.           the group (not the pattern itself). That means for example, that 
  808.           '\(oh+\) \1' matches 'oh oh' and 'ohh ohh', but not 'oh ohh' or 'ohh 
  809.           oh'. 
  810.  
  811. X+        matches an non-zero number of subsequent X's. 
  812.  
  813. X*        matches an arbitrary number of subsequent X's. Zero occurrences are 
  814.           included. For example '\(ab\)*' matches 'abab'. 
  815.  
  816. X?        matches zero or one occurrence of X. 
  817.  
  818. [Y]       matches all characters contained in Y. Here Y is not an arbitrary 
  819.           regular expression. Instead, Y may consist of a number of single 
  820.           characters ([yYnN]) and of sequences. Sequences are specified by the 
  821.           start and the end of the sequence separated by a dash. For example 
  822.           [a-zA-Z] matches all letters, and [0-9] matches all digits. 
  823.  
  824. ^X        matches X, if it is found at the beginning of the line. 
  825.  
  826. X$        matches X, if it is found at the end of the line. 
  827.  
  828. \<X       matches X at the beginning of a word. 
  829.  
  830. X\>       matches X at the end of a word. 
  831.  
  832. \         is the escape character. To avoid interpretation of a special 
  833.           character (like '[' or '*'), such characters must be preceded by a 
  834.           backslash. To search for a backslash double the backslash ('\\'). 
  835.           Note, that a parenthesis matches itself, while an escaped parenthesis 
  836.           is good for grouping patterns (see above). 
  837.  
  838.  
  839. ΓòÉΓòÉΓòÉ 4.7.2. Find and replace commands ΓòÉΓòÉΓòÉ
  840.  
  841. o CTRL-f f 
  842.  
  843.   searches for a pattern, which is asked for in the status line. By default the 
  844.   search is case sensitive and is directed forward. It starts at the character 
  845.   right to the cursor (important for repeated searches) and wraps around the 
  846.   end of the text to the beginning. By default, the search pattern is 
  847.   interpreted as a regular expression as used with grep. See above for turning 
  848.   regular expressions off and note the options 'x' and 'n' explained in the 
  849.   sequel. When the search pattern is empty, no search is done. 
  850.  
  851.   When the search pattern has been entered, EHP asks for the options in the 
  852.   status line. The following options can be combined as you like (no options is 
  853.   allowed, too; just press ENTER). Exceptions are, that b and e exclude each 
  854.   other and that r has no effect, if b or e are used. Available are: 
  855.  
  856.    Option         Effect 
  857.    <number>       find the <number>th occurrence of the pattern 
  858.    r              search in reverse direction 
  859.    i              ignore case (case insensitive search) 
  860.    w              find words only (found pattern must be limited by a word 
  861.                   separator 
  862.    b              search from the beginning of the text 
  863.    e              search from the end of the text in reverse direction 
  864.    x              interpret regular expressions in search pattern 
  865.    n              don't interpret regular expressions in search pattern 
  866.  
  867. o CTRL-f r 
  868.  
  869.   ssearches a specified number of times for a pattern and replaces it. By 
  870.   default, EHP asks before replacing a found pattern. This can be turned off 
  871.   using the options. Another default is, to underline the replace expression 
  872.   according to the underlining of the first character of the found pattern. 
  873.   Imagine, the text was 'documentation for editor EHP in INF format', and the 
  874.   replace is started with search pattern 'EHP' and replace pattern 'VI', then 
  875.   the replacement string is underlined, since the first letter of the found 
  876.   'EHP' was underlined. The resulting text is thus 'documentation for editor VI 
  877.   in INF format'. The underlining of the replace expression can be modified 
  878.   using the options. Note the difference between the number option with the 
  879.   find and the replace command: when doing find with option '10', the 10th 
  880.   occurrence is found. When replacing with option '10', the first 10 
  881.   occurrences are replaced (NOT only the 10th occurrence!). Options are as with 
  882.   find, additionally the following options are available: 
  883.  
  884.    Option    Effect 
  885.    a         replace all occurrences in the current file 
  886.    g         global: don't ask for replacement 
  887.    u         underline according to underline state This means, that the 
  888.              replace expression underlining is not determined from the 
  889.              underline state of the found pattern's first character, but from 
  890.              the current underline state in the current window (indicated in 
  891.              the window's top border). Thus, if underlining is turned on for 
  892.              the current window, then the replace expression is underlined 
  893.              regardless of underlining of the found pattern. 
  894.  
  895. o CTRL-n or CTRL-f a 
  896.  
  897.   repeats the last search or replace action. The search and replace patterns 
  898.   remain the same. Only the number provided in the options is reset to 1 
  899.   (nevertheless, when doing replace, option a is interpreted as before), and 
  900.   options b and e are removed. 
  901.  
  902.  
  903. ΓòÉΓòÉΓòÉ 4.7.3. Find multiple spaces ΓòÉΓòÉΓòÉ
  904.  
  905. When searching or replacing, the search pattern may contain blanks. Due to 
  906. EHP's internal representation of text, blanks beyond the end of the line are 
  907. not matched. That implies, that an empty line is not matched by a search 
  908. pattern consisting of one blank. Note this for example, if a search is done for 
  909. 'not ': a 'not' at the end of line is not found with this pattern. Use either 
  910. the w option (for finding words only) or construct a suitable regular 
  911. expression. 
  912.  
  913.  
  914. ΓòÉΓòÉΓòÉ 4.8. Tabs and indentation ΓòÉΓòÉΓòÉ
  915.  
  916. EHP supports two kinds of tabstops: tabs with fixed width and tabs depending on 
  917. word boundaries of the above line. Which kind of tabs is used depends on the 
  918. autoindent mode of the current window. 
  919.  
  920. Tabs are expanded to spaces in the text. If tab-compression is activated, each 
  921. 8 (independent of the chosen tabwidth) leading spaces on a line are compressed 
  922. into a tab when the text is written to a file. Otherwise they remain spaces. 
  923. Tab-compression is turned on by default. 
  924.  
  925. o CTRL-s a 
  926.  
  927.   toggles the autoindent mode for the current window. The mode is displayed in 
  928.   the top window border (Insert or Overwrt). 
  929.  
  930.  
  931. ΓòÉΓòÉΓòÉ 4.8.1. With autoindent ΓòÉΓòÉΓòÉ
  932.  
  933. If autoindent is active for the  current window, the tabwidth is determined by 
  934. looking at the line above the current line. Word separators in that line yield 
  935. as tab position for the current line. This is good for indenting comments or 
  936. for jumping to the same indentation as used in the above line. If the cursor is 
  937. located beyond the end of the above line, tabs proceed as without autoindent. 
  938.  
  939. If a line is splitted in autoindent mode using ENTER, the line on which the 
  940. cursor is after the operation is indented that way, that it starts below the 
  941. start of the first word of the above line. Inserting a line before or after the 
  942. current line using CTRL-a or CTRL-o places the cursor in the column, where the 
  943. first word of the previously current line starts. 
  944.  
  945.  
  946. ΓòÉΓòÉΓòÉ 4.8.2. Without autoindent ΓòÉΓòÉΓòÉ
  947.  
  948. In this mode the tabwidth is determined only by the predefined tabwidth, which 
  949. is 8 by default. This tabwidth can be modified by two ways: These are the 
  950. environment variable EHPINIT or by the command 
  951.  
  952. o CTRL-s t 
  953.  
  954.   asks for the new tabwidth, which can be entered in the status line. As 
  955.   default for this input yields the currently chosen tabwidth. Thus, pressing 
  956.   ENTER upon this query keeps the tabwidth unchanged. 
  957.  
  958.  
  959. ΓòÉΓòÉΓòÉ 4.9. Repeating ΓòÉΓòÉΓòÉ
  960.  
  961. o CTRL-r 
  962.  
  963.   repeats a command to specify a certain number of times. EHP first asks for 
  964.   the number of repetitions in the status line. Here an empty or zero input 
  965.   causes the command to repeat nothing. If a non-zero input was made, the 
  966.   command to repeat is asked for. One can enter the command as if it should be 
  967.   executed directly with one exception: the ENTER key must be escaped by 
  968.   prefixing it with CTRL-c (see also Controlcodes), since pressing the 
  969.   ENTER-key unescaped will be interpreted as the end of the command sequence. 
  970.   Note, that during input of the command the usual help texts will be displayed 
  971.   in the status line, if not turned off. 
  972.  
  973.   Repeating may be nested up to a depth of 20. Note, that macros also each take 
  974.   one of those nesting levels. So, if your command to repeat contains a macro, 
  975.   which itself has a nesting depth of say n, then there must be less than 20-n 
  976.   nested repeats around it. 
  977.  
  978.   Look at the following example for a better understanding. It causes five new 
  979.   lines to be inserted at the cursor position, where each of them is filled 
  980.   with the string 'hello': 
  981.  
  982.    Key commands      Effect 
  983.    CTRL-r            For invoking the repeat command 
  984.    5 ENTER           For specifying the number of repetitions 
  985.    CTRL-c            For escaping the subsequent ENTER 
  986.    ENTER             For inserting the new line at the cursor position 
  987.    hello             The text to be inserted in the new line 
  988.    ENTER             For terminating the command sequence to repeat 
  989.  
  990. o CTRL-n or CTRL-f a 
  991.  
  992.   repeats the last find/replace command. 
  993.  
  994.  
  995. ΓòÉΓòÉΓòÉ 4.10. Underline ΓòÉΓòÉΓòÉ
  996.  
  997. EHP offers the possibility to enter underlined text. See Fileformat for the 
  998. representation of underlined characters in the resulting file and consequences 
  999. of this representation. On the screen, underlined characters are displayed in 
  1000. red color. The underline mode is local to each window and is displayed in the 
  1001. top window border (Under in activated underline mode, nothing in non-active 
  1002. underline mode). 
  1003.  
  1004. If underlining is active, each inserted / overwritten character is 
  1005. automatically underlined. Furthermore, underline mode influences replacing 
  1006.  
  1007. To toggle the underline mode for the current window, use the following command: 
  1008.  
  1009. o CTRL-u 
  1010.  
  1011.   toggles the underline mode for the current window. 
  1012.  
  1013.  
  1014. ΓòÉΓòÉΓòÉ 4.11. Controlcodes ΓòÉΓòÉΓòÉ
  1015.  
  1016. Controlcodes cannot simply be typed to insert them into the text beacuse they 
  1017. would issue a command. Nevertheless EHP allows to insert them by escaping them 
  1018. with CTRL-c. 
  1019.  
  1020. o CTRL-c <character> 
  1021.  
  1022.   insert <character> into the text, regardless whether it is a controlcode or 
  1023.   even the escape key. Only a NULL character cannot be inserted at all, since 
  1024.   this would mark the end of line. CTRL-c CTRL-c inserts a ^C into the text, 
  1025.   for example. Characters with ASCII code smaller than 28 are displayed as 
  1026.   invers character with 64 added to the ASCII code. Thus, e.g. an CTRL-a is 
  1027.   displayed as invers A. 
  1028.  
  1029.  
  1030. ΓòÉΓòÉΓòÉ 4.12. Quit EHP ΓòÉΓòÉΓòÉ
  1031.  
  1032. o CTRL-x s 
  1033.  
  1034.   leaves EHP and saves all modified files. If the backupoption is active, then 
  1035.   the old file is saved by appending '.bak' to its name. The file attributes 
  1036.   remain as they were when loading the file, they are set to writeable, 
  1037.   non-system and non-hidden, if a new file is saved. If files cannot be saved 
  1038.   for some reasons, a warning is displayed. EHP offers the possibility to leave 
  1039.   anyway or to proceed with further editing. 
  1040.  
  1041. o CTRL-x n 
  1042.  
  1043.   leaves EHP without saving modified files. For safety, this action has to be 
  1044.   acknowledged in the status line. 
  1045.  
  1046. o CTRL-x S 
  1047.  
  1048.   leaves EHP without saving modified files after an acknowledgement, 
  1049.   additionally the load file is executed. 
  1050.  
  1051. o CTRL-x N 
  1052.  
  1053.   leaves EHP with saving modified files after an acknowledgement (see above), 
  1054.   additionally the load file is executed. 
  1055.  
  1056.  
  1057. ΓòÉΓòÉΓòÉ 4.13. Undo ΓòÉΓòÉΓòÉ
  1058.  
  1059. The only undo implemented so far is restoring a deleted line. 
  1060.  
  1061. o CTRL-k 
  1062.  
  1063.   inserts the last deleted line before the current line and makes this line the 
  1064.   current line. This command can be executed multiply (good for quickly 
  1065.   duplicating the current line or copying it to many different locations). 
  1066.  
  1067.  
  1068. ΓòÉΓòÉΓòÉ 4.14. Macros ΓòÉΓòÉΓòÉ
  1069.  
  1070. Macros are user-defined key command sequences (no mouse commands can be 
  1071. recorded within a macro). They can be recorded, executed, nested and repeated. 
  1072. Note, that the maximum nesting depth is limited to 20. 
  1073.  
  1074. o CTRL-v X (where X stands for an upcase letter) 
  1075.  
  1076.   records macro X. One can now input the key sequence, which is to make up the 
  1077.   macro. The maximum macro length is limited to 500 characters (the maximum 
  1078.   line length), where keys producing more than one character are counted as 
  1079.   multiple characters. If this sould be a limit to you, make use of nested 
  1080.   macros and the repeat command. During input of the macro, EHP displays the 
  1081.   usual helptexts in the status line, if they are not disabled. To finish the 
  1082.   macro recording hit the ENTER key. To insert an ENTER into the macro, use the 
  1083.   controlcode technique, that means, hit CTRL-c ENTER. 
  1084.  
  1085. o CTRL-v x (where x stands for an lowercase letter) 
  1086.  
  1087.   executes macro x. Note that this command cannot be entered when an input in 
  1088.   the status line is expected (e.g. the search expression). If this is desired, 
  1089.   the command issuing the status line query has to be included in the macro. If 
  1090.   the chosen macro is empty, a warning is displayed. For stopping the execution 
  1091.   of a macro see aboring running macros. 
  1092.  
  1093.  
  1094. ΓòÉΓòÉΓòÉ 4.15. Abort running macro / repeat function ΓòÉΓòÉΓòÉ
  1095.  
  1096. Running macros and running repeat commands can be aborted. 
  1097.  
  1098. o CTRL-Break 
  1099.  
  1100.   aborts all running macros and repeat commands. That means, that also in case 
  1101.   of a running nested macro all involved macros are terminated. 
  1102.  
  1103.  
  1104. ΓòÉΓòÉΓòÉ 4.16. Shell escape ΓòÉΓòÉΓòÉ
  1105.  
  1106. EHP allows to execute shell commands from within a text window. This can be 
  1107. done by using the shell mode. 
  1108.  
  1109. o CTRL-s s 
  1110.  
  1111.   activates/deactivates the shell mode for the current window. If the shell 
  1112.   mode is active for the current window can be determined by looking at the top 
  1113.   border of the current windows's frame. If SHELL is displayed there, then 
  1114.   shell mode is active. To issue a command, hit ENTER. Then the part of the 
  1115.   current line to the left of the cursor will be taken as the command and 
  1116.   passed to the shell. The standard output will be inserted as a block at the 
  1117.   cursor position. Note that the current line will be split at the point where 
  1118.   the cursor was when hitting ENTER. 
  1119.  
  1120.   Commands expecting further user input should not be executed in this way, 
  1121.   since one cannot provide any further interactive input after issuing the 
  1122.   command. The result of invoking such a program would be, that the shell 
  1123.   didn't return. In this case the only way to get back to EHP is to hit 
  1124.   CTRL-Break, which must not be catched by the running program. 
  1125.  
  1126.   Now, which shell is executed? EHP always uses the shell specified by the 
  1127.   environment variable COMSPEC. This is usually c:\os2\cmd.exe. If the command 
  1128.   execution caused an error, a corresponding message is displayed. 
  1129.  
  1130.  
  1131. ΓòÉΓòÉΓòÉ 4.17. Miscellaneous ΓòÉΓòÉΓòÉ
  1132.  
  1133. o CTRL-s a 
  1134.  
  1135.   toggles the autoindent mode for the current window. If autoindent is active 
  1136.   for the current window, this is indicated by the string Indent in the top 
  1137.   frame border. 
  1138.  
  1139. o CTRL-s t 
  1140.  
  1141.   sets the tablength for the current window. The new tablength must be entered 
  1142.   in the status line. As default serves the current tablength, which means, 
  1143.   that pressing ENTER on the query leaves the tablength for the current window 
  1144.   unchanged. Thus this command can also be used to determine the current 
  1145.   window's tablength. See also Tabs and indent for more detailed information 
  1146.   about tabs. 
  1147.  
  1148. o CTRL-s h 
  1149.  
  1150.   toggles activation of helptexts. If active, EHP displays a helptext in the 
  1151.   status line after the first key of a multi-key command. If the machine or the 
  1152.   display or whatever is too slow or one just wants the helptexts to disappear, 
  1153.   then helptexts can be deactivated by using this command. 
  1154.  
  1155. o CTRL-s b 
  1156.  
  1157.   toggles the blockhighlighting. By default, a marked block is displayed 
  1158.   highlighted. This takes some time. As for helptexts, if this seems to be too 
  1159.   slow, this highlighting can be deactivated using this command. 
  1160.  
  1161. o CTRL-s c 
  1162.  
  1163.   toggles the compression of tabs for the current window (see also Tabs and 
  1164.   indent). If activated, this is displayed by the string Tabs in the top frame 
  1165.   border, otherwise Spcs is displayed indicating, that leading spaces are 
  1166.   written out as spaces and not compress. 
  1167.  
  1168. o CTRL-s r 
  1169.  
  1170.   Toggles the default for the usage of regular expressions in searching. This 
  1171.   default overrides the default set in EHPINIT but can be overridden by a 
  1172.   search option (see also Find and replace). 
  1173.  
  1174. o CTRL-s . 
  1175.  
  1176.   toggles the creation of backup (.bak) files. 
  1177.  
  1178.  
  1179. ΓòÉΓòÉΓòÉ 5. Configuration file ΓòÉΓòÉΓòÉ
  1180.  
  1181. The configuration file is updated upon leaving EHP. It contains global flags 
  1182. (like blockhighlight, creation of backup files etc.), all defined macros, 
  1183. information about window size, position and files loaded, and the position of 
  1184. all defined markers. Thus is allows to restore the state exactly as it was when 
  1185. reinvoking EHP. 
  1186.  
  1187. When starting EHP the configuration file is looked for. If it is found, the 
  1188. global flags and the macros are restored in each case. If no filenames were 
  1189. specified in the command line, EHP loads the files specified in the 
  1190. configuration file into windows with the same size and position they had when 
  1191. leaving EHP the last time. In this case the markers are taken over, too. 
  1192.  
  1193. The name of the configuration file is config.ehp in the current directory by 
  1194. default. This is the name, under which it is written to disk as well as the 
  1195. name under which it is searched when starting EHP. This name can be modified by 
  1196. an entry in the environment variable EHPINIT. Via this option even an absolute 
  1197. path for the configuration file may be specified with the effect of having all 
  1198. ever defined macros global, for example. 
  1199.  
  1200.  
  1201. ΓòÉΓòÉΓòÉ 6. Environment variable EHPINIT ΓòÉΓòÉΓòÉ
  1202.  
  1203. If an environment variable named EHPINIT is provided, EHP reads its contents 
  1204. before reading the configuration file (so defaults specified in EHPINIT may be 
  1205. overridden by values stored in the configuration file). Set EHPINIT by invoking 
  1206.  
  1207. SET EHPINIT=... 
  1208.  
  1209. from within config.sys or from the command line, where ... is an arbitrary 
  1210. concatenation of the following options: 
  1211.  
  1212. Option              Effect 
  1213. autoind             Autoindent mode will be active when opening a new window. 
  1214. nohelp              Turns off helptexts when EHP is invoked. 
  1215. noshowblock         Blockhighlighting is turned off by default. 
  1216. nobak               When saving a file, no .bak file will be generated, if a 
  1217.                     file with this name already exists. 
  1218. deftab <n>          where <n> stands for a number. This sets the default 
  1219.                     tablength for a new window to <n>. <n> must be between 0 
  1220.                     and 500. 
  1221. conffile <f>        where <f> is a filename path (absolute or relative). This 
  1222.                     states, that the configuration file is stored and loaded 
  1223.                     with the name <f>. An example might be conffile 
  1224.                     c:\config.ehp. 
  1225. loadfile <f>        The load file is searched under path <f>. 
  1226. screen <mode>       where mode is <#columns>x<#lines> (instead of x also X is 
  1227.                     possible). This sets the screen size to the desired values. 
  1228.                     The provided values must be supported by the video card and 
  1229.                     the operating system, otherwise the values default to 
  1230.                     80x25, which should always be possible. An example might be 
  1231.                     screen 80x50. Note, that after leaving EHP, the screen size 
  1232.                     is switched back to the state it was in before invoking 
  1233.                     EHP. 
  1234. keys <f>            Tells EHP to load the keyboard mapping from file <f> 
  1235.                     instead of tasten.inf in the current directory. <f> may 
  1236.                     contain an absolute path. 
  1237. noregex             Turns off regular expressions for searching be default. 
  1238.                     This can be overridden by setting a global flag within EHP 
  1239.                     by a command or by using a search option. 
  1240.  
  1241.  
  1242. ΓòÉΓòÉΓòÉ 7. Load file ΓòÉΓòÉΓòÉ
  1243.  
  1244. When leaving EHP, this can be done by a command, which invokes a batch file 
  1245. after terminating EHP. By default, this batch file is searched in the current 
  1246. directory and is assumed to be named load.cmd. This default name can be 
  1247. overridden using the environment variable EHPINIT. A possible application for 
  1248. this is, that load.cmd contains the call of make or a different compilation 
  1249. tool, which performs some actions on the edited file(s). 
  1250.  
  1251.  
  1252. ΓòÉΓòÉΓòÉ 8. Keyboard remapping (KM utility) ΓòÉΓòÉΓòÉ
  1253.  
  1254. To make EHP suit individual keyboard layout requirements, EHP comes with a 
  1255. little tools enabling the modification and creation of own keaboard layout 
  1256. files. Since this tool is used at most only a few times, it is not very gold 
  1257. plated (not to say it is rather prehistoric, but it satisfies the basic needs). 
  1258. This tool is called KM, which stands for 'keymake'. 
  1259.  
  1260. KM can in addition to the modification of keystrokes modify the helptexts, that 
  1261. can be displayed after the first key of the command in the status line. KM 
  1262. assumes the keyboard file, which is called tasten.inf, to be located in the 
  1263. current directory. If no such file exists in the current directory, then an 
  1264. empty one it is created. 
  1265.  
  1266.  
  1267. ΓòÉΓòÉΓòÉ 8.1. Main menu ΓòÉΓòÉΓòÉ
  1268.  
  1269. After invoking KM, it is tried to read in the tasten.inf file. If the file has 
  1270. the wrong format, this is announced by an error message and the program stops. 
  1271. Otherwise, a menu comprising four items will be displayed. These items are 
  1272.  
  1273. o Change key combinations 
  1274.  
  1275. o Change helptexts 
  1276.  
  1277. o Show command names 
  1278.  
  1279. o Exit (save keyboard file) 
  1280.  
  1281. Issue the wished alternative by hitting the corresponding number (without 
  1282. subsequent ENTER key). 
  1283.  
  1284.  
  1285. ΓòÉΓòÉΓòÉ 8.2. Change keyboard command ΓòÉΓòÉΓòÉ
  1286.  
  1287. This command allows to provide key combinations for one or more commands. First 
  1288. the number of the command to change is queried. To answer this question, the 
  1289. below described option Show command names is helpful. Inputting the combination 
  1290. number is quitted by hitting ENTER. If -1 is entered as key combination number, 
  1291. changing of combinations is finished and KM returns to the main menu. 
  1292.  
  1293. If a correct number was provided, KM shows the current mapping in decimal form. 
  1294. If e.g. the combination is currently CTRL-l, then 12 is displayed, since the 
  1295. ASCII code for CTRL-l is 12. 
  1296.  
  1297. If the provided combination number exceeded the number of currently defined 
  1298. combinations, then a new command is established with a number greater by one 
  1299. than the combination number with the previously highest number. This of course 
  1300. only makes sense, if a new tasten.inf file is created or indeed EHP was 
  1301. extended by one or more commands (this would need a source code change as well 
  1302. in EHP as in KM). In the latter case the modification of tasten.inf would 
  1303. probably have been done by the programmer himself. 
  1304.  
  1305. Now KM asks for the new key combination. This may consist of any key 
  1306. combination not containing '/', since this is the key indicating the end of the 
  1307. combination. It cannot be escaped. Note, that of course events like 'hitting 
  1308. the left space key' or something like this can not be input at this point. When 
  1309. chosing your combinations, note that commands must not be prefixes of each 
  1310. other. This implies, that it is unconvenient to use normal letters like a,b,c 
  1311. as the first character of a command, since then inputting these characters in a 
  1312. text would not be easy anymore. 
  1313.  
  1314. The assertion, that commands must not be prefixes of each other is checked 
  1315. after inputting the combination.  If a collision is detected, this is announced 
  1316. by an error message and the old combination remains unchanged. In case the 
  1317. entered combination was a new one (would have been added as the last 
  1318. combination with the highest number), if a collision is detected, no new 
  1319. combination is created. 
  1320.  
  1321. If the provided combination consists of more than one ASCII code (note that 
  1322. this is also true for some function and cursor keys), all existing helptexts 
  1323. are displayed together with their indices. KM asks for a helptext index to link 
  1324. to the current combination. This helptext would then be displayed in EHP's 
  1325. status line after hitting the first character of the combination. If no 
  1326. helptext should be displayed, then one has to enter -1 as helptext index (this 
  1327. makes sense e.g. for the mentioned cases function keys or cursor keys). If a 
  1328. non-existing helptext index is input, then KM asks for a new helptext. See 
  1329. Change helptext for detailed information about changing and inputting the 
  1330. helptexts. 
  1331.  
  1332.  
  1333. ΓòÉΓòÉΓòÉ 8.3. Change helptext ΓòÉΓòÉΓòÉ
  1334.  
  1335. When this option is chosen, first all existing helptexts are displayed together 
  1336. with their indices. KM then asks for the number of the helptext to change. If a 
  1337. non-existing number is entered, the query is repeated. 
  1338.  
  1339. If the helptexts with the provided number exists, it is displayed once more and 
  1340. the new helptext is asked for. To enter letters, that should be highlighted in 
  1341. EHP's helptext display, such letters must be enclosed in parenthesis. For 
  1342. example '(L)ist' causes 'List' to be displayed. It is convention, to highlight 
  1343. the letters, which invoke further commands. 
  1344.  
  1345. One terminates the helptext by pressing ENTER. KM continues asking for helptext 
  1346. numbers, until -1 is entered. This returns to the main menu. 
  1347.  
  1348.  
  1349. ΓòÉΓòÉΓòÉ 8.4. Show command names ΓòÉΓòÉΓòÉ
  1350.  
  1351. All available editor commands are listed together with their numbers and names. 
  1352. Using this command makes sense to get out the number of a certain command, for 
  1353. which one wants to change the key combination. 
  1354.  
  1355. One screen page is filled with command names, then a message is displayed, that 
  1356. a keypress is expected for the continuation of the listing. Here, pressing a 
  1357. aborts the listing. When the listing is finished, one further keypressed is 
  1358. asked for, before KM returns to the main menu. 
  1359.  
  1360.  
  1361. ΓòÉΓòÉΓòÉ 8.5. Quit KM ΓòÉΓòÉΓòÉ
  1362.  
  1363. This choice terminates the KM program. The keyboard mapping is written to the 
  1364. file tasten.inf in the current directory. A possibly existing file will be 
  1365. overwritten. Thus, save one working keyboard mapping file to avoid accidental 
  1366. lost of keyboard definitions. To suppress the writing of the keyboard mapping, 
  1367. terminate the program by hitting CTRL-Break from the main menu. Note that all 
  1368. changes of this KM session will then be lost! 
  1369.  
  1370.  
  1371. ΓòÉΓòÉΓòÉ 9. Appendix ΓòÉΓòÉΓòÉ
  1372.  
  1373.  
  1374. ΓòÉΓòÉΓòÉ 9.1. Limits and bugs ΓòÉΓòÉΓòÉ
  1375.  
  1376. The line length is currently limeted to 500. If this should be a problem for 
  1377. anyone, please report (e.g. via email to auhl@fzi.de). Each window may contain 
  1378. 2^31-1 lines. There must be no more than 2^31-1 windows opened concurrently. 
  1379.  
  1380. If the text in a winsow contains the mamimal number of lines, no blocks can be 
  1381. moved anymore. 
  1382.  
  1383. An underscore - CTRL-h combination ar the end of line is interpreted as 
  1384. underlined space. 
  1385.  
  1386.  
  1387. ΓòÉΓòÉΓòÉ 9.2. Command reference ΓòÉΓòÉΓòÉ
  1388.  
  1389. Key combination     Associated command 
  1390. CTRL-a              Insert line before current line 
  1391. CTRL-b b            mark beginning of block 
  1392. CTRL-b c            copy block to cursor position 
  1393. CTRL-b d            delete block 
  1394. CTRL-b e            end of rectangular block (good for moving comments) 
  1395. CTRL-b f            filter the block (e.g. pass the block through SORT) 
  1396. CTRL-b i            indent block (left or right) 
  1397. CTRL-b m            move block to cursor position 
  1398. CTRL-b n            end of normal block (with line wrap) 
  1399. CTRL-b p            copy contents of paste-buffer to cursor position 
  1400. CTRL-b r            read block from file and insert at cursor position 
  1401. CTRL-b t            cuT block (means: copy it to the paste-buffer) 
  1402. CTRL-b u            unmark block 
  1403. CTRL-b w            write block to file 
  1404. CTRL-c              abort repeat function or macro execution, insert control 
  1405.                     code in text or command 
  1406. CTRL-e l            load file in current window 
  1407. CTRL-e r            rename file 
  1408. CTRL-e s            save file contained in current window 
  1409. CTRL-f a            Again (repeat last find or replace) 
  1410. CTRL-f f            find. For options see Find and replace. 
  1411. CTRL-f r            replace. For options see Find and replace. 
  1412. CTRL-g b            goto beginning of marked block 
  1413. CTRL-g e            goto end of marked block 
  1414. CTRL-g g            goto marker 
  1415. CTRL-g l            last position (stored before CTRL-g, jump to beginning or 
  1416.                     end of file, searching, replacing) 
  1417. CTRL-g n            goto line number 
  1418. CTRL-g s            set marker 
  1419. CTRL-j              Join (append following line to the current one) 
  1420. CTRL-k              (from the German korrigieren (correct)) insert the line 
  1421.                     deleted last (with CTRL-y) before the current line 
  1422. CTRL-l              Refresh (VI-like) 
  1423. CTRL-n              Repeat find/replace (same as CTRL-f-a) 
  1424. CTRL-o              (VI-like open line) insert line after current line 
  1425. CTRL-p              Jumps to the bracket (Parenthesis), that belongs to the 
  1426.                     one, being nearest to the cursor. 
  1427. CTRL-q              Delete to end-of-line 
  1428. CTRL-r              repeat a command sequence n times 
  1429. CTRL-s a            autoindent 
  1430. CTRL-s b            blockhighlighting 
  1431. CTRL-s c            tabcompression (blanks may be converted to tabs when saving 
  1432.                     the file, this is the default) 
  1433. CTRL-s r            regular expressions (like with GREP) for searching 
  1434. CTRL-s s            shell mode (when pressing RETURN, the part of the current 
  1435.                     line up to the cursor position is passed to the shell, the 
  1436.                     result of the executed command is inserted in the text and 
  1437.                     marked as a block) 
  1438. CTRL-s t            define tablength (how far the TAB key ought to jump, not 
  1439.                     what number of spaces is converted to a tab in the text's 
  1440.                     file representation) 
  1441. CTRL-s .            create .bak-files when overwriting an existing file 
  1442. CTRL-t              Delete word right to the cursor (Borland-like) 
  1443. CTRL-u              toggle underline mode (underlined characters are 
  1444.                     represented by _^H<x> where <x> is the underlined 
  1445.                     character). 
  1446. CTRL-v              Macro definition/execution 
  1447. CTRL-w c            close current window 
  1448. CTRL-w d            switch direct to another window by supplying the name of 
  1449.                     the file contained in the window 
  1450. CTRL-w i            switch to window by index (number of the window displayed 
  1451.                     in the lower left corner of each window) 
  1452. CTRL-w m            move window on the screen 
  1453. CTRL-w n            switch to next window 
  1454. CTRL-w o            open new window 
  1455. CTRL-w p            switch to previous window. This operation is symmetric, 
  1456.                     i.e. applied twice, you get to the window where you were 
  1457.                     before. 
  1458. CTRL-w s            change size of current window 
  1459. CTRL-w t            toggle window size (two sizes exist, both of which are 
  1460.                     initially set to full size) 
  1461. CTRL-x n            exit without saving and without executing the load file 
  1462.                     (the load file is a batch file, which can optionally be 
  1463.                     executed when quitting the editor, e.g. it may contain the 
  1464.                     call to MAKE) 
  1465. CTRL-x s            exit with saving all modified files, but without executing 
  1466.                     the load file 
  1467. CTRL-x N            exit without saving, but with loadfile execution. The 
  1468.                     default name for the load file is load.bat in the current 
  1469.                     directory, but it can be modified using the environment 
  1470.                     variable EHPINIT. 
  1471. CTRL-x S            exit with saving all modified files and executing the load 
  1472.                     file. 
  1473. CTRL-y              delete the current line (can be undone using CTRL-k) 
  1474. arr_left            move cursor left one character 
  1475. arr_right           move cursor right one character 
  1476. arr_up              move cursor up one character 
  1477. arr_down            move cursor down one character 
  1478. CTRL-arr_left       move cursor left one word 
  1479. CTRL-arr_right      move cursor right one word 
  1480. CTRL-arr_up         move window content including cursor one line up 
  1481. CTRL-arr_down       move window content including cursor one line down 
  1482. ALT-arr_left        make current line appear in the middle of the window 
  1483. ALT-arr_right       move cursor to the middle of the current window 
  1484. ALT-arr_up          make current line first line of window 
  1485. ALT-arr_down        make current line last line of window 
  1486. HOME                move cursor to beginning of current line 
  1487. END                 move cursor to end of current line 
  1488. CTRL-HOME           move cursor to the first line of the window 
  1489. CTRL-END            move cursor to the last line of the window 
  1490. PgUp                one page up 
  1491. PgDn                one page down 
  1492. CTRL-PgUp           go to beginning of file 
  1493. CTRL-PgDn           go to end of file 
  1494. ALT-PgUp            go half a page up 
  1495. ALT-PgDn            go half a page down 
  1496. DEL                 delete character on which the cursor stands 
  1497. Backspace           delete character left to the cursor. If cursor is in first 
  1498.                     column, join current line with the upper line. 
  1499. Ins                 Toggle insert/overwrite mode 
  1500.  
  1501.  
  1502. ΓòÉΓòÉΓòÉ 9.3. Mouse commands ΓòÉΓòÉΓòÉ
  1503.  
  1504. o Left button: 
  1505.  
  1506.    Position                      Effect 
  1507.    click on text                 Set the cursor to the current mouse position 
  1508.                                  and activate that window (if not already 
  1509.                                  activated) 
  1510.    click and move on text        Mark a normal block (like CTRL-b b and CTRL-b 
  1511.                                  n) 
  1512.    click on headline and move    Move the window 
  1513.    click on lower right corner of window and move Resize that window 
  1514.    click on upper left corner    Close that window (like CTRL-w c) 
  1515.    click on upper right corner   Toggle window size (like CTRL-w t) 
  1516.    click on arrows in frame      Scroll text in arrow direction 
  1517.    click on yes/no-question      YES 
  1518.  
  1519. o Right button: 
  1520.  
  1521.    Position                      Effect 
  1522.    click on text with no block marked and no block in PASTE-buffer Set the 
  1523.                                  cursor to the current mouse position and 
  1524.                                  activate that window (if not already 
  1525.                                  activated) 
  1526.    click on text with no block marked and block in the PASTE-buffer Paste the 
  1527.                                  block from the PASTE-buffer into the text at 
  1528.                                  the current mouse position 
  1529.    click on text with a block marked in the window clicked to The marked block 
  1530.                                  is stored in the PASTE-buffer and unmarked 
  1531.    click and move on text        Mark a rectangular block (like CTRL-b b and 
  1532.                                  CTRL-b r) 
  1533.    click on headline             Push the window into the background 
  1534.    click on lower right corner of window and move Resize that window 
  1535.    click on upper left corner    Close that window (like CTRL-w c) 
  1536.    click on upper right corner   Toggle window size (like CTRL-w t) 
  1537.    click on arrows in frame      Scroll text in arrow direction 
  1538.    click on yes/no-question      NO 
  1539.  
  1540. o Middle and left: (press middle first, then left, probably three-button-mouse 
  1541.   is not supported by OS/2 at the moment) 
  1542.  
  1543.    Position                      Effect 
  1544.    on text                       move marked block to mouseposition 
  1545.  
  1546. o Middle and right: (press middle first, then right, probably 
  1547.   three-button-mouse is not supported by the mouse driver) 
  1548.  
  1549.    Position                      Effect 
  1550.    on text or frame with marked block in window clicked to delete marked block 
  1551.                                  in current window 
  1552.