home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 3
/
PDCD_3.iso
/
utilities
/
utilsd
/
edit
/
!lEdit
/
!Help
< prev
next >
Wrap
Text File
|
1995-04-19
|
31KB
|
965 lines
lEdit Version 0.1 [35]
----------------------
** (c) 1995 Urs Bisang **
** all rights reserved **
This version of lEdit is FREEWARE!
Permission is granted for unrestricted non-commercial use!
If you find this program useful or if you have comments, requests
or bug reports please send a mail to:
bisang@solid.phys.ethz.ch
Purpose: (Lisp) Text Editor
--------
Introduction:
-------------
lEdit is a fully programmable and customizable text editor,
that has special support for Lisp programming. It supports
automatic identing of the source code and the matching of parentheses.
This features can be disabled and then lEdit behaves like a
simple text editor comparable to !Edit. The main difference to other
editors is that lEdit has a builtin Lisp interpreter. Actually lEdit
has been programmed in Lisp itself, so you can customize lEdit in
every way simply by changing the lisp source code and without any
recompilation of the application. In this way lEdit is similar to Emacs
(the famous editor in the Unix world). Of course lEdit is much simpler
and less powerful than Emacs, but it is also much smaller!
Description:
------------
The handling of lEdit is very similar to !Edit. So mainly the
differences to !Edit will be described. For further details on
!Edit see for example the 'RISC OS3 Applications Guide'.
Short description of the menu entries:
Misc
----
Info : tells you about lEdit
New View : opens additional window on the same text
Print : sends the document to the printer
Undo : allows you to step backwards through the most recent changes
you have made to the text
Redo : allows you to remake the changes you reversed with Undo
Save
----
Save: save the file in the current window
Select
------
Save : saves the current text selection
Print : prints the current text selection
Copy : copies current text selection (to the cursor position)
Move : moves current text selection (to the cursor position)
Delete : deletes current text selection
Clear : clears (unselects) current text selection
Edit
----
Find : allows you to search for a string in your file
the find utility is rather simple and no wildcarded
search strings are allowed. but escape characters such
as '\n', '\r', etc and \xhh (hh : hex number)
are allowed to search for non printable characters.
\\ is used for the backslash itself
Goto : allows you to move to a specific line in your file
Replace : allows you to replace a string or all matching strings
through another string in your file. the replace facility
has been separated from the find facility in order to
prevent replacing accidently
Ident : ident line, that contains the cursor according to the rules
of lisp identing
RecIdent : ident lines recursively starting from the line that
contains the cursor
Match () : shows the matching opening parenthesis if the cursor is
right behind a closing parenthesis. if there is no matching
parenthesis or the cursor is not behind a closing
parenthesis nothing happens. in this context parenthesis
means only 'real' parentheses that belong to a lisp
construct (list) and do not stand inside a string,
comment or character constant
Next ( : moves the cursor to the next opening 'real' parenthesis.
Previous ( : moves to previous (matching!) opening 'real' parenthesis
Next ) : moves to next (matching!) closing 'real' parenthesis
Previous ) : moves to previous closing 'real' parenthesis
Options
-------
Ident : enable/disable automatic line identing after typing return
Match : enable/disable automatic highlighting of matching parentheses
after typing a closing parentheses
Amimate : enable/disable animation of cursor on identing
Important keystroke and keystroke equivalents:
Function keys:
--------------
F3 : save file
F4 : find string
F5 : goto line
F6 : replace string
F8 : undo
F9 : redo
Control keys:
-------------
Ctrl-C : copies current text selection (to the cursor position)
Ctrl-V : moves current text selection (to the cursor position)
Ctrl-X : deletes current text selection
Ctrl-Z : clears (unselects) current text selection
Ctrl-R : ident lines recursively
Ctrl-M : show matching 'real' parenthesis
Ctrl-A : moves the cursor to the next opening 'real' parenthesis.
Ctrl-S : moves to previous (matching!) opening 'real' parenthesis
Ctrl-D : moves to next (matching!) closing 'real' parenthesis
Ctrl-F : moves to previous closing 'real' parenthesis
Misc keys:
----------
TAB : ident line, that contains the cursor according to the rules
of lisp identing
SHIFT-TAB : similar to TAB but differing slightly in the rules
for identation (has fixed identation under symbols
as default)
HOME : moves cursor to beginning of the file
DELETE : deletes character to the left of cursor
BACKSPACE : deletes character to the left of cursor
COPY : deletes character to the right of cursor
PAGE-UP : scroll up one window
PAGE-DOWN : scroll down one window
ARROW-UP : moves cursor one line up
ARROW-DOWN : moves cursor one line down
ARROW-LEFT : moves cursor to the left
ARROW-RIGHT : moves cursor to the right
CTRL-ARROW-UP : moves cursor to the beginning of the file
CTRL-ARROW-DOWN : moves cursor to the end of the file
CTRL-ARROW-LEFT : moves the cursor to the first non blank charakter
of the line
CTRL-ARROW-RIGHT: moves cursor to the end of line
Customising lEdit:
------------------
The fonts and the colors used for lEdit can be set using the
environment variable lEdit$Options. The options are the same as
for !Edit (see the 'RISC OS3 Applications Guide'). Apart from
that you can change lEdit in every way (menu layout, keyboard shortcuts,
default settings, new functionality, etc.) by simply patching the
source code, contained in the 'l' directory within the lEdit
application directory. This flexibilty is the main advantage of lEdit
over other editors, due to fact that lEdit is fully programable with its
builtin Lisp interpreter. You could even write a 'completely new editor'
or additional modes with support for other programming languages like
C, C++, Pascal, etc.
There are some special forms like define, defun, lambda, let, etc.,
which have special identation rules. If you have additional forms,
that should be idented in a special way, you can do this by
extending the function 'txt-lisp-ident-hook' located in the file
lispmode. Extensions should be straightforward.
The Lisp Interpreter:
---------------------
The builtin Lisp interpreter is very simple and supports
only two data types: strings and cons cells. Integer and float numbers
are represented as strings, therefore the interpreter is rather slow.
The idea is to use the interpreter as an extension language and
to implement computational intensive task as additional primitives in C.
The naming conventions for the primitives are similar to Scheme.
But it ist not Scheme! The interpreter is dynamically scoped, and
no closures and no continuations are supported. The interpreter is not
tail-recursive! There are additional types like hash tables or opaque
types (menus, text buffers, etc.) which are not first class and 'exist'
only bound to a symbol. If you want to pass an object of such a type to a
function or primitive, you have to pass the symbol which this object
is bound to. If you evaluate a symbol which is bound to an object of
such an non first class type, it evaluates not to its value, but rather to
its own name. I call this form of evaluation 'name evaluation' and
the corresponding non first class types name evaluation types.
The introduction of this rather strange name evaluation is necessary, as
the interpreter supports only strings and cons cells. Functions that
expect name evaluati