_H_o_w_ _t_o_ _c_h_a_n_g_e_ _t_h_e_ _d_e_f_a_u_l_t_ _e_d_i_t_o_r_.

The Miranda /e command (see manual page on command interpreter)  invokes
an editor.  By default this is the standard UNIX screen editor "vi".  If
you don't like "vi", or would prefer to  use  another  editor,  this  is
easily arranged.

The Miranda command
	/editor

reports  the  editor  currently in use by the Miranda system.  To change
it, just say
	/editor foo

where "foo" is  the  name  of  the  editor  you  wish  to  use  instead.
Alternatively,  when  next invoking the miranda system from UNIX you can
supply it with a flag requesting a specific editor by name, as follows:
	mira -editor foo ...

In either case it is only necessary to do this once, since  the  Miranda
system  stores  such  information  permanently.  (It does this in a file
called ".mirarc" in your home directory  -  you  should  not  remove  or
tamper with this file).

_M_o_r_e_ _a_d_v_a_n_c_e_d_ _i_n_f_o_r_m_a_t_i_o_n
 The  interface between the Miranda system and the editor is improved if
there is a way of telling the editor to open  a  file  with  the  cursor
positioned  at  a specified line number.  For example to make the editor
`vi' open a file at line 13, the UNIX command is
	vi +13 file
the Miranda system has built in knowledge of this, so if  the  installed
editor  is `vi' and the compiler has found a syntax error in the script,
the Miranda `/e' command will open the script at the line containing the
error.

To retain this ability when substituting another editor  for  `vi',  you
must  supply  the  `/editor' command with the template of a UNIX command
for invoking your editor at a given line number.  In this  template  the
line  number is represented by the character `!' and the filename by the
character `%'.  For example the full template for `vi' would be supplied
to Miranda in the following way
	/editor vi +! %

If  the  `%'  character  does  not  occur in your template, Miranda will
assume that the name of the file is to  be  added  to  the  end  of  the
command,  as its final argument.  So the template for `vi' could equally
well be given as
	/editor vi +!

As another example, the appropriate command for  installing  micro-emacs
as the resident editor is
	/editor ue -g!

If you install an editor without  the  capability  to  be  opened  at  a
specified  line  number  (i.e.   you  cannot  give  a  template  for  it
containing the `!' character), the /e command loses its ability  to  "go
to  the  right  place"  after  an  error,  and  the `??' command will be
disabled (`??identifier' asks the Miranda system to  open  the  relevant
source file at the definition of the given identifier.)

The Miranda system will work perfectly  well  without  either  of  these
features,  but  there  is  a  significant  loss  of  power  in  the user
interface.  If you intend to use the Miranda system a  lot,  you  should
either  contemplate  learning  an  editor  with  an  open-at-line-number
feature (such as vi, or micro-emacs), or else lobbying  the  person  who
maintains  your  usual editor, if you have access to him, to enhance its
interface to UNIX by adding an `open at line number' flag to its command
line.

If your installed editor lacks the `open at line  number'  feature,  you
may  find  it  convenient to have the script listed to the screen during
compilation (this feature of the compiler can be switched on and off  by
the  commands `/list', `/nolist').  As an assistance to naive users, the
Miranda system turns on `/list' for you if the `/editor' command is used
to install an editor without the `open at line number' feature.

[Pathological case:
 "What  do  I  do  if  the  name  of  my  editor contains a `!' or a `%'
character?" You escape it with a backslash,  so  if  the  name  of  your
editor is `oh!calcutta!', to install it in Miranda you must say
	/editor oh\!calcutta\!

end of pathological case]

