Annotation of src/usr.bin/mg/mg.1, Revision 1.1
1.1 ! deraadt 1: .TH MG 1
! 2: .SH NAME
! 3: mg \- Micro Gnu emacs
! 4: .SH SYNOPSIS
! 5: .B mg
! 6: [
! 7: .I files
! 8: ]
! 9: .SH DESCRIPTION
! 10: .B Mg
! 11: is intended as a micro version of Gnu Emacs. It is intended primarily
! 12: for use on PC's of various kinds, where it may not be practical to
! 13: run Gnu Emacs because of its size. However it is also useful on
! 14: larger systems for some purposes. Because it is about 1/10 the size
! 15: of Gnu Emacs, it starts much faster, and is much less likely to
! 16: cause paging.
! 17: .LP
! 18: Normal editing commands should be identical to Gnu Emacs. It differs
! 19: primarily in not having special modes for tasks other than straight
! 20: editing, e.g. mail and news, and in not having special modes that
! 21: support various programming languages. It does have text justification
! 22: and auto-fill mode. It is written directly in C, so there is no
! 23: language in which you can write extensions. However you can rebind
! 24: keys and change some parameters. There are no limits to line length
! 25: or format. Command, buffer, and file name completion and listing can
! 26: be done using space and ? respectively.
! 27: .LP
! 28: .B Mg
! 29: is close enough to Gnu Emacs that you can learn it the same way:
! 30: using the program
! 31: .BR teach-emacs .
! 32: .B Teach-emacs
! 33: will invoke Gnu Emacs, however the features that it teaches should
! 34: work identically on
! 35: .BR mg .
! 36: .LP
! 37: The one major difference is in configuration files. Gnu Emacs uses
! 38: a configuration file
! 39: .IR .emacs ,
! 40: which is written in Lisp.
! 41: .B Mg
! 42: uses its own configuration files, which contain extend mode Emacs
! 43: commands (i.e. commands that you could type after doing m-x).
! 44: There are two configuration files,
! 45: .IR .mg ,
! 46: and
! 47: .IR .mg-TERM .
! 48: TERM here represents the name of you terminal type. E.g. if
! 49: your terminal type is set to vt100,
! 50: .B mg
! 51: will use
! 52: .I .mg-vt100
! 53: as a startup file. The terminal type startup file is used
! 54: first. If either of these files does not exist,
! 55: .B mg
! 56: will look for a file by the same name (but without the leading
! 57: dot) in
! 58: .IR /usr/local/lib/mg .
! 59: .LP
! 60: See the manual for a full list of the commands that can
! 61: go in the files. The most commonly
! 62: used ones are probably key binding. The following example is
! 63: part of a configuration file used to set make
! 64: .B mg
! 65: respond to the keypad on a Microport SV/AT system. The normal
! 66: keys send a sequence of the form <ESC> [ <letter>. I also
! 67: want to use keys prefixed by <ESC> as having different meaning.
! 68: In order to deal with multi-character sequences, the initial
! 69: subsequences must be defined as prefixes. To allow for this,
! 70: three prefixes are left undefined in the initial setup. They
! 71: are called "extra prefix 1", etc.
! 72: .br
! 73: ;allow normal pad
! 74: .br
! 75: global-set-key ^[[ "extra prefix 1"
! 76: .br
! 77: ;allow prefixed pad
! 78: .br
! 79: global-set-key ^[^[ "extra prefix 2"
! 80: .br
! 81: global-set-key ^[^[[ "extra prefix 3"
! 82: .br
! 83: ;keypad
! 84: .br
! 85: global-set-key ^[[A previous-line
! 86: .br
! 87: global-set-key ^[[H scroll-down
! 88: .br
! 89: ...etc
! 90: .br
! 91: ;escaped keypad
! 92: .br
! 93: global-set-key ^[^[[A exchange-point-and-mark
! 94: .br
! 95: global-set-key ^[^[[H beginning-of-buffer
! 96: .br
! 97: ...etc
! 98: .LP
! 99: Here's another example sequence that you may find useful. By default ()
! 100: and [] are recognized as brackets, so bracket matching can be done.
! 101: The following defines {} as brackets, and turns on the mode that causes
! 102: the cursor to "blink" to show you matching brackets.
! 103: .br
! 104: global-set-key } blink-matching-paren-hack
! 105: .br
! 106: blink-matching-paren
! 107: .br
! 108: set-default-mode blink
! 109: .SH ARGUMENTS
! 110: .B Mg
! 111: does not take any options. The only arguments you can pass it are
! 112: file names. It will do a find-file on each one, reading it into
! 113: a buffer. It will leave the last buffer on the screen. If you call
! 114: .B mg
! 115: from
! 116: .BR vnews ,
! 117: both the original article and your reply will be in separate buffers.
! 118: The original article will be showing. Use "c-x b" to switch to the
! 119: buffer for your reply.
! 120: .SH "SEE ALSO"
! 121: .BR gnuemacs (1),
! 122: .BR teach-emacs (1)
! 123: .SH BUGS
! 124: When you type ? to list possible file names, buffer names, etc.,
! 125: a help buffer is created for the possibilities. In Gnu Emacs,
! 126: this buffer goes away the next time you type a real command.
! 127: In
! 128: .BR mg ,
! 129: you must use "m-x 1" to get rid of it.
! 130: .SH FILES
! 131: .LP
! 132: .mg - normal startup file
! 133: .LP
! 134: .mg-TERM - terminal-specific startup file
! 135: .LP
! 136: /usr/local/lib/mg - directory for system-wide startup files. Files in
! 137: this directory do not have the leading dot.
! 138: .LP
! 139: /usr/doc/mg.doc - full manual