home *** CD-ROM | disk | FTP | other *** search
/ PDA Software Library / pdasoftwarelib.iso / HP95_100 / UTILITY / PE / PE.ZIP / README < prev   
Encoding:
Text File  |  1996-10-17  |  15.1 KB  |  356 lines

  1. PalEdit 1.1b
  2. ------------
  3.  
  4. PalEdit is a simple text editor written using PAL (Palmtop Application
  5. Library). Its look and feel is very similar to the HP100LX/200LX
  6. built-in Memo application. 
  7.  
  8. PalEdit is copyrighted freeware provided by
  9.  
  10.                 D&A Software Inc.
  11.                 Email: info@dasoft.com
  12.  
  13. Some highlights of PalEdit:
  14.  
  15.  - handles files of unlimited size
  16.  - lines can be up to 32767 characters long
  17.  - several files can be open at the same time
  18.  - uses the SysMgr clipboard if SysMgr is running
  19.  - uses its own clipboard if SysMgr is not running
  20.  - supports all zoom modes of the HP palmtops
  21.  - can edit binary files
  22.  - supports incremental searches
  23.  - supports search and replace
  24.  - supports keyboard macros 
  25.  - can shell to DOS
  26.  - is mostly keyboard-compatible with the EMACS editor
  27.  - can directly start a compiler and take you to the locations
  28.    where errors were found
  29.  - is expandable using DOS filters
  30.  - Can send and receive electronic mail using WWW/LX
  31.  - Runs on the desktop in VGA mode using Harry Konstas' INF5F.
  32.  
  33. If you are familiar with the built-in Memo editor, you should not have
  34. any difficulties to use PalEdit. Most keys behave almost the same way
  35. as in Memo. Unlike Memo however, PalEdit is a simple text editor and
  36. does not support formatted texts (boldface, underline, promote etc.).
  37. Also, PalEdit does not directly support printing.
  38.  
  39. On the other hand, PalEdit is a much more powerful text editor than Memo.
  40. PalEdit is usually much faster than Memo and is not limited in file
  41. size, line size, the characters you can use etc.
  42.  
  43. If you are familiar with EMACS-style editors (EMACS is a wide-spread
  44. UNIX editor), you will find that PalEdit also supports all commonly
  45. used EMACS keystrokes.
  46.  
  47. If you get stuck in PalEdit or if you don't remember what keys to
  48. press to accomplish a certain function, simply press F1 to open a text
  49. file which explains the keystrokes that PalEdit understands.
  50.  
  51. If you familiar with other text editors, you will be used to most
  52. commands of PalEdit. Some special features, however, are discussed in
  53. the remainder of this text.
  54.  
  55.  
  56. Files / running PalEdit:
  57.  
  58. The editor itself is PE.EXE. You can start it by typing "PE" on the DOS
  59. command line or by typing something like "PE MYFILE.TXT", in which
  60. case the file MYFILE.TXT is loaded into PalEdit. You can also specify
  61. multiple files on the command line and use wild cards.
  62.  
  63. The file PE.HLP contains the help text for PalEdit that is shown when
  64. you press F1. It must reside in the same directory as PE.EXE. Also
  65. into the same directory you have to put PE.CFG, a file that determines
  66. the configuration of PalEdit.
  67.  
  68. PalEdit needs at least 150k RAM. The more memory it gets, the faster it
  69. runs.
  70.  
  71.  
  72. Editing multiple files:
  73.  
  74. PalEdit can have several files open at the same time. This makes it
  75. easy to quickly switch between different files and copy and paste text
  76. from one file to another. To open a different file while a file is
  77. still open, simply press F9 ("Open") and enter the name of the file
  78. you want to edit. If you want to go back to the old file, press F7. If
  79. you have several open files, this will cycle through all the open
  80. files. If you have many files open, you might want to use Ctrl-X,
  81. Ctrl-B instead of F7. This will display a menu of open files you can
  82. choose from.
  83.  
  84. In the file open dialog, you can choose from a list of the last 10 files
  85. you were editing. This is a fast way to pick a file - and this list is
  86. saved (in C:\_DAT\PE.ENV) when you quit PalEdit.
  87.  
  88. If you are developing software with PAL, you can simply start PalEdit
  89. with "PE @". This will open all the files specified in the SCRLIST
  90. file in the current directory.
  91.  
  92.  
  93. Margins and formatting:
  94.  
  95. Although PalEdit is not a word processor, it still supports some basic
  96. formatting of the text, namely where lines are broken. There is a
  97. right margin that you can set using the keys Menu T R. If this margin
  98. is set to, say 72, and you keep on typing past column 72, the line
  99. will automatically be broken. If you, on the other hand, set this
  100. value to zero, the lines will be broken only when you hit ENTER. If
  101. you want to change the position at which the lines are broken later
  102. on, simply set the margin (using Menu T R) to the value you want, go
  103. to the paragraph (i.e. the area between two empty lines) you want to
  104. reformat and press Menu T F. This is especially handy if you want to
  105. re-format a paragraph after you have added or deleted some words and
  106. the paragraph looks ragged. 
  107.  
  108.  
  109. Tabs:
  110.  
  111. PalEdit supports tabulators in a slightly different way than most
  112. other text editors do. To the user, it looks the same: pressing the
  113. TAB key just goes to the next tabulator position. While most editors
  114. insert a TAB character at that position, PalEdit inserts spaces
  115. instead. This ensures that the text will look the same independent of
  116. which viewer or editor you use to look at the text. If a text you load
  117. into PalEdit already contains TAB characters, PalEdit will ask you if
  118. they should be expanded to spaces. If you say "no", the TAB characters
  119. will be maintained and display as small circles. The distance between
  120. tab stops can be set in PE.CFG and defaults to 8.
  121.  
  122.  
  123. Searching:
  124.  
  125. Searching for a text works as follows in most editors: you press a key
  126. to open a dialog in which you enter the string you want to search for.
  127. After you have entered the string, you press another key and tell the
  128. editor that it should start searching now. PalEdit (and EMACS) work
  129. much more efficiently: you press a key to tell the editor you want to
  130. search for a string (F4 or Ctrl-S) and then you start typing the
  131. string you are looking for. While you are typing, PalEdit already
  132. searches for the string and displays to you the next occurence of the
  133. string you typed so far.
  134.  
  135. This kind of searching is faster in two ways: you don't need to type
  136. that much because the searched text may already be found when you
  137. typed fewer keys than you expected. And PalEdit already searches while
  138. you are still typing and not only after you have completed typing and
  139. press (yet another!) key to tell you have finished typing. 
  140.  
  141. While in search-mode, you can hit F4 (or Ctrl-S) again to
  142. find the next occurence of the string you have entered up to now. Or you
  143. can press Shift-F4 (or Ctrl-R) to search for the previous occurence. A
  144. typo can be corrected by using the Backspace key.
  145.  
  146. If you plan to replace the string you have found (or all these
  147. strings) with a different string, press F5 after the first occurence
  148. is found. Then enter the string with which the found text should be
  149. replaced. PalEdit will then take you to all occurences of the string
  150. and ask you to confirm the replacement. You can also replace all
  151. occurencies with one keystroke.
  152.  
  153.  
  154. PE.CFG:
  155.  
  156. There are several features in PalEdit that you can configure. Some of
  157. them you can access from the Options menu, and all of them you can
  158. specify in the file PE.CFG, which must reside in the same directory as
  159. PE.EXE. PalEdit reads this file when it starts and sets all parameters
  160. according to the settings found there. Have a look at PE.CFG. It
  161. contains short explanations for what the parameters are about.
  162.  
  163. In PE.CFG, you can assign macros to keys by adding entries in the
  164. [Macros] section of PE.CFG. Each macro definition starts with the scan
  165. code of the key you assign to the macro, followed by an equal sign
  166. ('='), followed by the scan codes of the keys that should be pressed.
  167. An example:
  168.  
  169.  #1e00=#7700#5032#7500   This assigns a macro to ALT-A (#1e00). If
  170. ALT-A is pressed, the following keys will be pressed for you: #7700 is
  171. Ctrl-Home, #5032 is Shift-Down and #7500 is Ctrl-End. This sequence
  172. will mark the whole text. To find out the scan code of a key, press
  173. ESC-K and then the key, PalEdit inserts the scan code of that key
  174. (without the "#") at the current cursor position. In the [Labels]
  175. section of PE.CFG, you can assign labels for the macros to any of the
  176. unused function keys (e.g. F2 or F3). Example:
  177.  
  178.  2 = Hello
  179.  
  180. assign the key label "Hello" to F2. Make sure these labels are not
  181. longer than 7 characters.
  182.  
  183.  
  184. PalEdit for programming:
  185.  
  186. There are a some features in PalEdit that may be especially interesting
  187. for programmers:
  188.  
  189. If auto-indent is enabled and you press ENTER, the cursor is positioned
  190. in the first column of the next line that lies below the first
  191. non-space character of the current line.
  192.  
  193. It is sometimes difficult to keep track of parentheses, brackets etc.
  194. PalEdit supports you with that: when the cursor is positioned on one
  195. of the characters that typically come in pairs and you press ESC
  196. followed by TAB, PalEdit will put the cursor onto the matching
  197. parenthesis, bracket, etc.
  198.  
  199. PalEdit supports keyboard macros for repetitive key sequences: press
  200. Ctrl-X (, then press the sequence of keys, and finally press Ctrl-X ).
  201. After that, the key sequence is stored and you can replay it with
  202. Ctrl-X E. If you want to repeat it, say 20 times, press Ctrl-U 20
  203. Ctrl-X E. 
  204.  
  205. Note that the Ctrl-U <number> feature works for most other keys
  206. too, not just for macros.
  207.  
  208.  
  209. Integrating PalEdit with a compiler:
  210.  
  211. If you are developing software using PalEdit, you can directly call the
  212. compiler from PalEdit. When compilation is done and errors are reported,
  213. PalEdit takes you to the location of these errors. In order to do that,
  214. you have to set up your compiler and PalEdit as follows: the result of
  215. the compilation has to be stored in a file named "SCRATCH". If you use,
  216. for example, the PalMake utility PM, you should remove the ">$(/err)"
  217. parts from PM.CFG and let PM write the errors to the screen. Then add
  218. the line "Compiler = PM >SCRATCH" to the [File] section of PE.CFG. This
  219. instructs PalEdit how to start the compiler. If you now press Ctrl-XC,
  220. PalEdit will execute "PM >SCRATCH", i.e. it will run PM and redirect the
  221. output of PM to the file SCRATCH. As soon as PM is done, PalEdit
  222. displays the contents of the SCRATCH file. If there were no errors, you
  223. are done. If there were errors, simply press Ctrl-XG. This will take
  224. you to the file and location of the first error found in SCRATCH. If you
  225. later press Ctrl-XG again, it will take you to the next error (no need
  226. to go back to the file SCRATCH, BTW). 
  227.  
  228. Note: In order for Ctrl-XG (goto next error) to work, the errors in the
  229. SCRATCH file must have the following format (TCC, for example, produces
  230. this format): each line containing an error message or warning must
  231. start with the string "Error " or "Warning ", then continue with a file
  232. name, then a space and the line number and, finally, the error message.
  233.  
  234.  
  235. Filters:
  236.  
  237. You can expand the capabilities of PalEdit by using so called filters.
  238. A filter is an external program that can take a chunk of text from
  239. PalEdit, process it and return the result to PalEdit. Let's look at an
  240. example. Let's assume the following line is found in the [Filter]
  241. section of PE.CFG:
  242.  
  243.    Indent 3 = sed -e "s/^/   /g" <%s >SCRATCH
  244.  
  245. This line generates an entry in a menu that you can pop up by pressing
  246. Ctrl-XR. The entry will show "Indent 3". When you select that entry,
  247. and you have a piece of text selected, PalEdit will store that piece of
  248. text in a temporary file (let's assume its name is xxx) and call the
  249. DOS command
  250.  
  251.    sed -e "s/^/   /g" <xxx >SCRATCH
  252.  
  253. As you see, the "%s" is now replaced by the actual file name "xxx". SED
  254. is a program that can take a stream of characters and perform some
  255. editing operations on it. In the current example, it would insert three
  256. spaces at the beginning of each line from file xxx. The result is
  257. written to a file named "SCRATCH". When SED has finished, PalEdit will
  258. cut the original selection and replace it by the contents of the file
  259. named SCRATCH (the name of that file is fixed; each filter has to write
  260. to a file named SCRATCH).
  261.  
  262. If no selection is active, PalEdit will use the whole file as input to
  263. the command. It will then not replace the file by the output of the
  264. command, but open and display the file SCRATCH.
  265.  
  266. If the string "@@" is found in the command, PalEdit will prompt the
  267. user for input and replace "@@" by what the user typed. For example,
  268.  
  269.    dir @@ >SCRATCH
  270.  
  271. will ask the user for input. If the user types "C:\_DAT", the command
  272.  
  273.    dir C:\_DAT >SCRATCH
  274.  
  275. is executed.
  276.  
  277. If the command returns line numbers (e.g. "grep" with the -n option,
  278. Ctrl-XG will take you to the the line number that is indicated on the
  279. line the cursor is currently standing on. This is similar to what
  280. Ctrl-XG does after compilation.
  281.  
  282.  
  283. Electronic Mail:
  284.  
  285. Together with WWW/LX, available from D&A Software Inc., PalEdit is able
  286. to send email to the Internet and receive email from the Internet. In
  287. order to send email to the Internet, you have to add the following line
  288. (modified appropriately) to the [Mail] section of PalEdit:
  289.  
  290.    SMTP=my.smtp.server
  291.  
  292. where "my.smtp.server" has to be the name of a  host that can accept
  293. email in SMTP format. Also, you need to specify your email address so
  294. that the system can find out who sent the message:
  295.  
  296.    From=my_name@my_machine.my_domain
  297.  
  298. In order to receive email, you need to add a line such as:
  299.  
  300.    POP=my.pop.server
  301.  
  302. where "my.pop.server" is the name of a host that can deliver mail to
  303. you using the POP protocol. You also need to specify a name of a file
  304. that should get the incoming mail:
  305.  
  306.    MailFile=C:\_DAT\MY_MAIL.TXT
  307.  
  308. If the login name and the password to access the POP server is the same
  309. that you need to access your ISP, PalEdit will automatically use these
  310. values. If they are not the same, add the line
  311.  
  312.    Manual_POP_Login=1
  313.  
  314. If you want to use PalEdit to answer to "mailto" links from within HV,
  315. you need to specify the following line in the [Services] section of
  316. HV.CFG:
  317.  
  318.    mailto=pe -m %s %s
  319.  
  320. If "PE" is not on your DOS path, you need to specify the full path and
  321. file name for PalEdit.
  322.  
  323. When PalEdit is set up to send and receive mail, you will see an
  324. additional item in the main menu bar: "Mail". If you want to send the
  325. currently displayed text as email, choose Menu Mail Send as Email.
  326. PalEdit will ask you for missing header fields and, if all headers are
  327. OK, send off the email message. In order to receive email, choose Menu
  328. Mail Get Email. PalEdit will connect to the POP server and retrieve
  329. waiting email. It will store it (append it) to the file you specified
  330. with "MailFile" and display you that file. "Get Email" will not delete
  331. the messages on the POP server, so if you do another "Get Email", you
  332. will retrieve the same messages again. In order to delete the messages,
  333. use "Get/Delete Email".
  334.  
  335. Of course, this all works only if WWW/LX is already loaded in memory.
  336. The simplest way to start WWW/LX and PalEdit together is:
  337.  
  338.    WWW -d !pe
  339.  
  340. provided PE is on the DOS path. Otherwise, you need to specify the full
  341. path. The -d tells WWW/LX not to establish the connection before you
  342. actually want to send or retrieve email. You can close the connection
  343. at any time from within PalEdit using Menu Mail Disconnect WWW/LX.
  344.  
  345. If you start PalEdit with "pe -e", it will directly take you to the
  346. mail file. In order to add that option to the startup command for
  347. WWW/LX, use:
  348.  
  349.    WWW -d "!pe -e"
  350.  
  351.  
  352. ---
  353.  
  354. Andreas Garzotto, September 1996
  355.  
  356. (written using PalEdit - of course :-)