version 1.1, 2000/02/25 19:08:49 |
version 1.2, 2000/02/25 19:10:22 |
|
|
.TH MG 1 |
.Dd February 25, 2000 |
.SH NAME |
.Dt MG 1 |
mg \- Micro Gnu emacs |
.Os |
.SH SYNOPSIS |
.Sh NAME |
.B mg |
.Nm mg |
[ |
.Nd emacs-like text editor |
.I files |
.Sh SYNOPSIS |
] |
.Nm mg |
.SH DESCRIPTION |
.Op files |
.B Mg |
.Sh DESCRIPTION |
is intended as a micro version of Gnu Emacs. It is intended primarily |
.Nm |
for use on PC's of various kinds, where it may not be practical to |
is intented intended to be a small, fast, and portable editor for |
run Gnu Emacs because of its size. However it is also useful on |
people who can't (or don't want to) run real emacs thing for one |
larger systems for some purposes. Because it is about 1/10 the size |
reason or another, or are not familiar with the |
of Gnu Emacs, it starts much faster, and is much less likely to |
.Xr vi 1 |
cause paging. |
editor. It is compatible with emacs because there shouldn't |
.LP |
be any reason to learn more editor types than emacs or |
|
.Xr vi 1 . |
|
.Pp |
Normal editing commands should be identical to Gnu Emacs. It differs |
Normal editing commands should be identical to Gnu Emacs. It differs |
primarily in not having special modes for tasks other than straight |
primarily in not having special modes for tasks other than straight |
editing, e.g. mail and news, and in not having special modes that |
editing, e.g. mail and news, and in not having special modes that |
|
|
keys and change some parameters. There are no limits to line length |
keys and change some parameters. There are no limits to line length |
or format. Command, buffer, and file name completion and listing can |
or format. Command, buffer, and file name completion and listing can |
be done using space and ? respectively. |
be done using space and ? respectively. |
.LP |
.Pp |
.B Mg |
.Pp |
is close enough to Gnu Emacs that you can learn it the same way: |
|
using the program |
|
.BR teach-emacs . |
|
.B Teach-emacs |
|
will invoke Gnu Emacs, however the features that it teaches should |
|
work identically on |
|
.BR mg . |
|
.LP |
|
The one major difference is in configuration files. Gnu Emacs uses |
The one major difference is in configuration files. Gnu Emacs uses |
a configuration file |
a configuration file |
.IR .emacs , |
.IR .emacs , |
which is written in Lisp. |
which is written in Lisp. |
.B Mg |
.Nm |
uses its own configuration files, which contain extend mode Emacs |
uses its own configuration files, which contain extend mode Emacs |
commands (i.e. commands that you could type after doing m-x). |
commands (i.e. commands that you could type after doing m-x). |
There are two configuration files, |
There are two configuration files, |
|
|
.IR .mg-TERM . |
.IR .mg-TERM . |
TERM here represents the name of you terminal type. E.g. if |
TERM here represents the name of you terminal type. E.g. if |
your terminal type is set to vt100, |
your terminal type is set to vt100, |
.B mg |
.Nm |
will use |
will use |
.I .mg-vt100 |
.I .mg-vt100 |
as a startup file. The terminal type startup file is used |
as a startup file. The terminal type startup file is used |
first. If either of these files does not exist, |
first. If either of these files does not exist, |
.B mg |
.Nm |
will look for a file by the same name (but without the leading |
will look for a file by the same name (but without the leading |
dot) in |
dot) in |
.IR /usr/local/lib/mg . |
.IR /usr/local/lib/mg . |
.LP |
.Pp |
See the manual for a full list of the commands that can |
See the manual for a full list of the commands that can |
go in the files. The most commonly |
go in the files. The most commonly |
used ones are probably key binding. The following example is |
used ones are probably key binding. The following example is |
part of a configuration file used to set make |
part of a configuration file used to set make |
.B mg |
.Nm |
respond to the keypad on a Microport SV/AT system. The normal |
respond to the keypad on a Microport SV/AT system. The normal |
keys send a sequence of the form <ESC> [ <letter>. I also |
keys send a sequence of the form <ESC> [ <letter>. I also |
want to use keys prefixed by <ESC> as having different meaning. |
want to use keys prefixed by <ESC> as having different meaning. |
|
|
subsequences must be defined as prefixes. To allow for this, |
subsequences must be defined as prefixes. To allow for this, |
three prefixes are left undefined in the initial setup. They |
three prefixes are left undefined in the initial setup. They |
are called "extra prefix 1", etc. |
are called "extra prefix 1", etc. |
.br |
.Bd -literal -offset indent |
;allow normal pad |
;allow normal pad |
.br |
global-set-key ^[[ "extra prefix 1" |
global-set-key ^[[ "extra prefix 1" |
;allow prefixed pad |
.br |
global-set-key ^[^[ "extra prefix 2" |
;allow prefixed pad |
global-set-key ^[^[[ "extra prefix 3" |
.br |
;keypad |
global-set-key ^[^[ "extra prefix 2" |
global-set-key ^[[A previous-line |
.br |
global-set-key ^[[H scroll-down |
global-set-key ^[^[[ "extra prefix 3" |
...etc |
.br |
|
;keypad |
;escaped keypad |
.br |
global-set-key ^[^[[A exchange-point-and-mark |
global-set-key ^[[A previous-line |
global-set-key ^[^[[H beginning-of-buffer |
.br |
.Ed |
global-set-key ^[[H scroll-down |
.Pp |
.br |
|
...etc |
|
.br |
|
;escaped keypad |
|
.br |
|
global-set-key ^[^[[A exchange-point-and-mark |
|
.br |
|
global-set-key ^[^[[H beginning-of-buffer |
|
.br |
|
...etc |
|
.LP |
|
Here's another example sequence that you may find useful. By default () |
Here's another example sequence that you may find useful. By default () |
and [] are recognized as brackets, so bracket matching can be done. |
and [] are recognized as brackets, so bracket matching can be done. |
The following defines {} as brackets, and turns on the mode that causes |
The following defines {} as brackets, and turns on the mode that causes |
the cursor to "blink" to show you matching brackets. |
the cursor to "blink" to show you matching brackets. |
.br |
.Bd -literal -offset indent |
global-set-key } blink-matching-paren-hack |
global-set-key } blink-matching-paren-hack |
.br |
blink-matching-paren |
blink-matching-paren |
set-default-mode blink |
.br |
.Ed |
set-default-mode blink |
.Pp |
.SH ARGUMENTS |
.Sh ARGUMENTS |
.B Mg |
.Nm |
does not take any options. The only arguments you can pass it are |
does not take any options. The only arguments you can pass it are |
file names. It will do a find-file on each one, reading it into |
file names. It will do a find-file on each one, reading it into |
a buffer. It will leave the last buffer on the screen. If you call |
a buffer. It will leave the last buffer on the screen. |
.B mg |
.Sh "SEE ALSO" |
from |
.Xr vi 1 |
.BR vnews , |
.Sh BUGS |
both the original article and your reply will be in separate buffers. |
|
The original article will be showing. Use "c-x b" to switch to the |
|
buffer for your reply. |
|
.SH "SEE ALSO" |
|
.BR gnuemacs (1), |
|
.BR teach-emacs (1) |
|
.SH BUGS |
|
When you type ? to list possible file names, buffer names, etc., |
When you type ? to list possible file names, buffer names, etc., |
a help buffer is created for the possibilities. In Gnu Emacs, |
a help buffer is created for the possibilities. In Gnu Emacs, |
this buffer goes away the next time you type a real command. |
this buffer goes away the next time you type a real command. |
In |
In |
.BR mg , |
.Nm , |
you must use "m-x 1" to get rid of it. |
you must use "m-x 1" to get rid of it. |
.SH FILES |
.Sh FILES |
.LP |
.Pp |
.mg - normal startup file |
.Bl -tag -width /etc/passwd -compact |
.LP |
.It ~/.mg |
.mg-TERM - terminal-specific startup file |
normal startup file |
.LP |
.It ~/.mg-TERM |
/usr/local/lib/mg - directory for system-wide startup files. Files in |
terminal-specific startup file |
this directory do not have the leading dot. |
.It /usr/local/lib/mg |
.LP |
Directory for system-wide startup files. (Files in |
/usr/doc/mg.doc - full manual |
this directory do not have the leading dot). |
|
.El |