diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2000-02-25 19:10:23 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2000-02-25 19:10:23 +0000 |
commit | 73dbeaf93db1f7d141e3bf5750195367867fadea (patch) | |
tree | 157a6161950897b7e003fb0d1df434edb8398f47 | |
parent | d44fe623968310c5c8b668113425b8ac1172df35 (diff) |
mandoc, but needs much more fleshing out
-rw-r--r-- | usr.bin/mg/mg.1 | 155 |
1 files changed, 66 insertions, 89 deletions
diff --git a/usr.bin/mg/mg.1 b/usr.bin/mg/mg.1 index a44951f19e7..70a68a87585 100644 --- a/usr.bin/mg/mg.1 +++ b/usr.bin/mg/mg.1 @@ -1,20 +1,22 @@ -.TH MG 1 -.SH NAME -mg \- Micro Gnu emacs -.SH SYNOPSIS -.B mg -[ -.I files -] -.SH DESCRIPTION -.B Mg -is intended as a micro version of Gnu Emacs. It is intended primarily -for use on PC's of various kinds, where it may not be practical to -run Gnu Emacs because of its size. However it is also useful on -larger systems for some purposes. Because it is about 1/10 the size -of Gnu Emacs, it starts much faster, and is much less likely to -cause paging. -.LP +.Dd February 25, 2000 +.Dt MG 1 +.Os +.Sh NAME +.Nm mg +.Nd emacs-like text editor +.Sh SYNOPSIS +.Nm mg +.Op files +.Sh DESCRIPTION +.Nm +is intented intended to be a small, fast, and portable editor for +people who can't (or don't want to) run real emacs thing for one +reason or another, or are not familiar with the +.Xr vi 1 +editor. It is compatible with emacs because there shouldn't +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 primarily in not having special modes for tasks other than straight editing, e.g. mail and news, and in not having special modes that @@ -24,21 +26,13 @@ language in which you can write extensions. However you can rebind keys and change some parameters. There are no limits to line length or format. Command, buffer, and file name completion and listing can be done using space and ? respectively. -.LP -.B Mg -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 +.Pp +.Pp The one major difference is in configuration files. Gnu Emacs uses a configuration file .IR .emacs , which is written in Lisp. -.B Mg +.Nm uses its own configuration files, which contain extend mode Emacs commands (i.e. commands that you could type after doing m-x). There are two configuration files, @@ -47,21 +41,21 @@ and .IR .mg-TERM . TERM here represents the name of you terminal type. E.g. if your terminal type is set to vt100, -.B mg +.Nm will use .I .mg-vt100 as a startup file. The terminal type startup file is used 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 dot) in .IR /usr/local/lib/mg . -.LP +.Pp See the manual for a full list of the commands that can go in the files. The most commonly used ones are probably key binding. The following example is part of a configuration file used to set make -.B mg +.Nm respond to the keypad on a Microport SV/AT system. The normal keys send a sequence of the form <ESC> [ <letter>. I also want to use keys prefixed by <ESC> as having different meaning. @@ -69,71 +63,54 @@ In order to deal with multi-character sequences, the initial subsequences must be defined as prefixes. To allow for this, three prefixes are left undefined in the initial setup. They are called "extra prefix 1", etc. -.br - ;allow normal pad -.br - global-set-key ^[[ "extra prefix 1" -.br - ;allow prefixed pad -.br - global-set-key ^[^[ "extra prefix 2" -.br - global-set-key ^[^[[ "extra prefix 3" -.br - ;keypad -.br - global-set-key ^[[A previous-line -.br - global-set-key ^[[H scroll-down -.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 +.Bd -literal -offset indent +;allow normal pad +global-set-key ^[[ "extra prefix 1" +;allow prefixed pad +global-set-key ^[^[ "extra prefix 2" +global-set-key ^[^[[ "extra prefix 3" +;keypad +global-set-key ^[[A previous-line +global-set-key ^[[H scroll-down +...etc + +;escaped keypad +global-set-key ^[^[[A exchange-point-and-mark +global-set-key ^[^[[H beginning-of-buffer +.Ed +.Pp Here's another example sequence that you may find useful. By default () and [] are recognized as brackets, so bracket matching can be done. The following defines {} as brackets, and turns on the mode that causes the cursor to "blink" to show you matching brackets. -.br - global-set-key } blink-matching-paren-hack -.br - blink-matching-paren -.br - set-default-mode blink -.SH ARGUMENTS -.B Mg +.Bd -literal -offset indent +global-set-key } blink-matching-paren-hack +blink-matching-paren +set-default-mode blink +.Ed +.Pp +.Sh ARGUMENTS +.Nm 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 -a buffer. It will leave the last buffer on the screen. If you call -.B mg -from -.BR vnews , -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 +a buffer. It will leave the last buffer on the screen. +.Sh "SEE ALSO" +.Xr vi 1 +.Sh BUGS When you type ? to list possible file names, buffer names, etc., a help buffer is created for the possibilities. In Gnu Emacs, this buffer goes away the next time you type a real command. In -.BR mg , +.Nm , you must use "m-x 1" to get rid of it. -.SH FILES -.LP -.mg - normal startup file -.LP -.mg-TERM - terminal-specific startup file -.LP -/usr/local/lib/mg - directory for system-wide startup files. Files in -this directory do not have the leading dot. -.LP -/usr/doc/mg.doc - full manual +.Sh FILES +.Pp +.Bl -tag -width /etc/passwd -compact +.It ~/.mg +normal startup file +.It ~/.mg-TERM +terminal-specific startup file +.It /usr/local/lib/mg +Directory for system-wide startup files. (Files in +this directory do not have the leading dot). +.El |