1
1

Minor formatting and textual fixes.

Этот коммит содержится в:
Pavel Roskin 2003-01-19 17:47:50 +00:00
родитель 6caf099244
Коммит 1ccfa25357

Просмотреть файл

@ -1,21 +1,21 @@
.TH mcedit 1 "30 January 1997" .TH mcedit 1 "30 January 1997"
.\"SKIP_SECTION"
.SH NAME .SH NAME
mcedit \- Full featured terminal text editor for Unix-like systems. mcedit \- Internal file viewer of GNU Midnight Commander.
.\"SKIP_SECTION"
.SH USAGE .SH USAGE
.B mcedit .B mcedit
[[+number] file [\-bcCdfhstVx?]] [\-bcCdfhstVx?] [+number] file
.SH DESCRIPTION .SH DESCRIPTION
.LP .LP
Mcedit is a link to mcedit is a link to
.B mc, .BR mc ,
the Midnight Commander, forcing it the main GNU Midnight Commander executable. Executing GNU Midnight
to immediately start its internal editor. The editor is a terminal Commander under this name requests staring the internal editor and
version of the opening the
.I file
specified on the command line. The editor is based on the terminal
version of
.B cooledit .B cooledit
standalone X Window editor. \- standalone editor for X Window System.
.\".\"DONT_SPLIT"
.SH OPTIONS .SH OPTIONS
.TP .TP
.I "+number" .I "+number"
@ -23,7 +23,7 @@ Go to the line specified by number (do not insert
a space between the "+" sign and the number). a space between the "+" sign and the number).
.TP .TP
.I "\-b" .I "\-b"
Forces black and white display. Force black and white display.
.TP .TP
.I "\-c" .I "\-c"
Force color mode on terminals where Force color mode on terminals where
@ -31,60 +31,47 @@ Force color mode on terminals where
defaults to black and white. defaults to black and white.
.TP .TP
.I "\-C <keyword>=<FGcolor>,<BGcolor>:<keyword>= ..." .I "\-C <keyword>=<FGcolor>,<BGcolor>:<keyword>= ..."
Used to specify a different color set, where Specify a different color set. See the
.I keyword
is one of normal, selected, marked, markselect, errors,
reverse menu, menusel, menuhot, menuhotsel and gauge. The colors
are optional and are one of black, gray, red, brightred, green,
brightgreen, brown, yellow, blue, brightblue, magenta,
brightmagenta, cyan, brightcyan, lightgray and white.
See the
.B Colors .B Colors
section in section in mc(1) for more information.
.B mc.1
for more information.
.TP .TP
.I "\-d" .I "\-d"
Disables mouse support. Disable mouse support.
.TP .TP
.I "\-f" .I "\-f"
Displays the compiled-in search paths for Midnight Commander files. Display the compiled-in search paths for GNU Midnight Commander files.
.TP .TP
.I "\-t" .I "\-t"
Used only if the code was compiled with Slang and terminfo: it makes Used only if the code was compiled with Slang and terminfo: it makes
the Midnight Commander use the value of the the Midnight Commander use the value of the
.B TERMCAP .B TERMCAP
variable for the terminal information instead of the information on variable for the terminal information instead of the information on
the system wide terminal database the system wide terminal database.
.TP .TP
.I "\-V" .I "\-V"
Displays the version of the program. Display the version of the program.
.TP .TP
.I "\-x" .I "\-x"
Forces xterm mode. Used when running on xterm-capable terminals (two Forces xterm mode. Used when running on xterm-capable terminals (two
screen modes, and able to send mouse escape sequences). screen modes, and able to send mouse escape sequences).
.PP .PP
.SH Features .SH FEATURES
The internal file editor provides most of the features of common full The internal file editor provides most of the features of common full
screen editors. It has an extendable file size limit of sixteen megabytes screen editors. It has an extendable file size limit of sixteen
and edits binary files flawlessly. The features it presently supports megabytes and edits binary files flawlessly. The features it presently
are: Block copy, move, delete, cut, paste; supports are: Block copy, move, delete, cut, paste;
.I "key for key undo"; .I key for key undo;
pull-down pull-down menus; file insertion; macro definition; regular expression
menus; file insertion; macro definition; regular expression search and replace (and our own scanf-printf search and replace);
search and replace (and our own scanf-printf search and shift-arrow MSW-MAC text highlighting (if supported by the terminal);
replace); shift-arrow MSW-MAC text highlighting (for the insert-overwrite toggle; word-wrap; a variety of tabbing options; syntax
linux console only); insert-overwrite toggle; word-wrap; highlighting for various file types; and an option to pipe text blocks
a variety of tabbing options; syntax highlighting for through shell commands like indent and ispell.
various file types; and an option
to pipe text blocks through shell commands like indent and
ispell.
.PP .PP
.SH Keys .SH KEYS
The editor is very easy to use and requires no tutoring. The editor is easy to use and can be used without learning. To see what
To see what keys do what, just consult the appropriate keys do what, just consult the appropriate pull-down menu. Other keys
pull-down menu. Other keys are: Shift movement are: Shift movement keys do text highlighting,
keys do text highlighting (Linux console only).
.B Ctrl-Ins .B Ctrl-Ins
copies to the file copies to the file
.BR ~/.mc/cedit/cooledit.clip , .BR ~/.mc/cedit/cooledit.clip ,
@ -97,10 +84,10 @@ cuts to
.BR ~/.mc/cedit/cooledit.clip , .BR ~/.mc/cedit/cooledit.clip ,
and and
.B Ctrl-Del .B Ctrl-Del
deletes highlighted text - all linux console only. Mouse highlighting deletes highlighted text - all if supported by the terminal. Mouse
also works, and you can override the mouse as usual by holding down highlighting also works, and you can override the mouse as usual by
the shift key while dragging the mouse to let normal terminal mouse holding down the shift key while dragging the mouse to let normal
highlighting work. terminal mouse highlighting work.
.PP .PP
The completion key (usually The completion key (usually
.B "Alt-Tab" .B "Alt-Tab"
@ -114,19 +101,19 @@ To define a macro, press
and then type out the key and then type out the key
strokes you want to be executed. Press strokes you want to be executed. Press
.B Ctrl-R .B Ctrl-R
again when finished. You can then assign the macro to any key you again when finished. You can then assign the macro to any key you like
like by pressing that key. The macro is executed when you press by pressing that key. The macro is executed when you press
.B Ctrl-A .B Ctrl-A
and then the assigned key. The macro is also executed if and then the assigned key. The macro is also executed if you press
you press Meta, Ctrl, or Esc and the assigned key, provided that the Meta, Ctrl, or Esc and the assigned key, provided that the key is not
key is not used for any other function. Once defined, the macro used for any other function. Once defined, the macro commands go into
commands go into the file the file
.BR ~/.mc/cedit/cooledit.macros . .BR ~/.mc/cedit/cooledit.macros .
Do NOT edit this file if you are going to use macros again in the same Do NOT edit this file if you are going to use macros again in the same
editing session, because editing session, because
.B mcedit .B mcedit
caches macro key defines in memory. caches macro key defines in memory.
.B Mcedit .B mcedit
now overwrites a macro if a macro with the same key already exists, now overwrites a macro if a macro with the same key already exists,
so you won't have to edit this file. You will also have to restart so you won't have to edit this file. You will also have to restart
other running editors for macros to take effect. other running editors for macros to take effect.
@ -141,39 +128,43 @@ if you need.
.B C-p .B C-p
will run ispell on a block of text in a similar way. The script file will run ispell on a block of text in a similar way. The script file
will be called will be called
.B ~/.mc/cedit/edit.spell.rc .BR ~/.mc/cedit/edit.spell.rc .
.
.PP .PP
.SH Redefining Keys Keys can be redefined from the Midnight Commander options menu.
Keys may be redefined from the Midnight Commander options
menu.
.PP .PP
.SH SYNTAX HIGHLIGHTING .SH SYNTAX HIGHLIGHTING
As of version 3.6.0, \fBcooledit\fP has syntax highlighting. This means As of version 3.6.0,
that keywords and contexts (like C comments, string constants, etc) .B cooledit
are highlighted in different colors. The following section explains supports syntax highlighting. This means that keywords and contexts
the format of the file \fB~/.mc/cedit/Syntax\fP. (like C comments, string constants, etc) are highlighted in different
colors. The following section explains the format of the file
The file \fB~/.mc/cedit/Syntax\fP is rescanned on opening of a any new .BR ~/.mc/cedit/Syntax .
editor file. The file contains rules for highlighting, each of which is The file
given on a separate line, and define which keywords will be highlighted .B ~/.mc/cedit/Syntax
to what color. The file is also divided into sections, each beginning is rescanned on opening of a any new editor file. The file contains
with a line with the \fBfile\fP command, followed by a regular rules for highlighting, each of which is given on a separate line, and
expression. The regular expression dictates the file name that that set define which keywords will be highlighted to what color. The file is
of rules applies to. Following this is a description to be printed on the also divided into sections, each beginning with a line with the
left of the editor window explaining the file type to the user. A third .B file
optional argument is a regular expression to match the first line of command, followed by a regular expression. The regular expression
text of the file. If either the file name matches, or the first line of text, dictates the file name that that set of rules applies to. Following
then those rules will be loaded. this is a description to be printed on the left of the editor window
explaining the file type to the user. A third optional argument is a
regular expression to match the first line of text of the file. If
either the file name matches, or the first line of text, then those
rules will be loaded.
.PP
A section ends with the start of a new section. Each section is divided A section ends with the start of a new section. Each section is divided
into contexts, and each context contains rules. A context is a scope into contexts, and each context contains rules. A context is a scope
within the text that a particular set of rules belongs to. For instance, within the text that a particular set of rules belongs to. For instance,
the region within a C style comment (i.e. between \fB/*\fP and \fB*/\fP) the region within a C style comment (i.e. between
.B /*
and
.BR */ )
has its own color. This is a context, although it will have no further has its own color. This is a context, although it will have no further
rules inside it because there is probably nothing that we want rules inside it because there is probably nothing that we want
highlighted within a C comment. highlighted within a C comment.
.PP
A trivial C programming section might look like this: A trivial C programming section might look like this:
.PP .PP
.nf .nf
@ -273,16 +264,16 @@ Because keywords have a higher precedence than context delimiters, this
keyword prevents the context from ending at the end of a line if the keyword prevents the context from ending at the end of a line if the
line ends in a \\ thus allowing C preprocessor directive to continue line ends in a \\ thus allowing C preprocessor directive to continue
across multiple lines. across multiple lines.
.PP
The colors themselves are numbered 0 to 26 and are explained below in The colors themselves are numbered 0 to 26 and are explained below in
\fBFURTHER BEHAVIORAL OPTIONS\fP. You can also use \fBany\fP of the named \fBFURTHER BEHAVIORAL OPTIONS\fP. You can also use \fBany\fP of the named
colors specified in \fB/usr/lib/X11/rgb.txt\fP, though only one word colors specified in \fB/usr/lib/X11/rgb.txt\fP, though only one word
versions of them. It is better to stick to the numerical colors versions of them. It is better to stick to the numerical colors
to limit use of the color palette. to limit use of the color palette.
.PP
Comments may be included on a line of there own and begin with Comments may be included on a line of there own and begin with
a #. a #.
.PP
Because of the simplicity of the implementation, there are a few Because of the simplicity of the implementation, there are a few
intricacies that will not be coped with correctly but these are a minor intricacies that will not be coped with correctly but these are a minor
irritation. On the whole, a broad spectrum of quite complicated irritation. On the whole, a broad spectrum of quite complicated
@ -292,7 +283,7 @@ do with a little imagination. If you can't get by with the rules I have
coded, and you think you have a rule that would be useful, please email coded, and you think you have a rule that would be useful, please email
me with your request. However, do not ask for regular expression me with your request. However, do not ask for regular expression
support, because this is flatly impossible. support, because this is flatly impossible.
.PP
A useful hint is to work with as much as possible with the things A useful hint is to work with as much as possible with the things
you \fIcan\fP do rather than try to do things that this you \fIcan\fP do rather than try to do things that this
implementation can't cope with. Also remember that the aim of implementation can't cope with. Also remember that the aim of
@ -379,28 +370,22 @@ are made. You can specify your own backup file extension in
the dialog. Note that saving twice will replace your backup the dialog. Note that saving twice will replace your backup
as well as your original file. as well as your original file.
.PP .PP
.SH Miscellaneous .SH MISCELLANEOUS
You can use scanf search and replace to search and replace a C format
(Scanf search and replace have previously not worked properly. string. First take a look at the
With this release, problems with search and replace have been
fixed.)
You can use scanf search and replace to search and replace
a C format string. First take a look at the
.B sscanf .B sscanf
and and
.B sprintf .B sprintf
man pages to see what a format string man pages to see what a format string is and how it works. Here's an
is and how it works. An example is as follows: Suppose you want example: suppose that you want to replace all occurrences of an open
to replace all occurrences of say, an open bracket, three bracket, three comma separated numbers, and a close bracket, with the
comma separated numbers, and a close bracket, with the
word word
.I apples, .IR apples ,
the third number, the word the third number, the word
.I oranges .I oranges
and then the second number, you would fill in the Replace dialog and then the second number. You would fill in the Replace dialog box as
box as follows: follows:
.PP
.nf .nf
.B Enter search string .B Enter search string
(%d,%d,%d) (%d,%d,%d)
@ -409,40 +394,41 @@ apples %d oranges %d
.B Enter replacement argument order .B Enter replacement argument order
3,2 3,2
.fi .fi
.PP
The last line specifies that the third and then the second The last line specifies that the third and then the second number are to
number are to be used in place of the first and second. be used in place of the first and second.
.PP
It is advisable to use this feature with Prompt On Replace on, because It is advisable to use this feature with Prompt On Replace on, because
a match is thought to be found whenever the number of arguments found a match is thought to be found whenever the number of arguments found
matches the number given, which is not always a real match. Scanf also matches the number given, which is not always a real match. Scanf also
treats whitespace as being elastic. Note that the scanf format %[ is treats whitespace as being elastic. Note that the scanf format %[ is
very useful for scanning strings, and whitespace. very useful for scanning strings, and whitespace.
.PP
The editor also displays non-us characters (160+). When editing The editor also displays non-us characters (160+). When editing
binary files, you should set binary files, you should set
.B display bits .B display bits
to 7 bits in the Midnight Commander options menu to keep the to 7 bits in the Midnight Commander options menu to keep the
spacing clean. spacing clean.
.PP .PP
.SH FILES .SH FILES
@prefix@/share/mc/mc.hlp @prefix@/share/mc/mc.hlp
.IP .IP
The help file for the program. The help file for the program.
.PP .PP
@prefix@/share/mc/mc.ini .I @prefix@/share/mc/mc.ini
.IP .IP
The default system-wide setup for the Midnight Commander, used only if The default system-wide setup for GNU Midnight Commander, used only if
the user lacks his own ~/.mc/ini file. the user's own ~/.mc/ini file is missing.
.PP .PP
@prefix@/share/mc/mc.lib .I @prefix@/share/mc/mc.lib
.IP .IP
Global settings for the Midnight Commander. Settings in this file are Global settings for the Midnight Commander. Settings in this file
global to any Midnight Commander, it is useful to define site-global affect all users, whether they have ~/.mc/ini or not.
.\"LINK2 .PP
terminal settings. $HOME/.mc/ini
.\"Terminal databases" .IP
User's own setup. If this file is present, the setup is loaded from
here instead of the system-wide startup file.
.PP .PP
$HOME/.mc/ini $HOME/.mc/ini
.IP .IP
@ -454,7 +440,6 @@ $HOME/.mc/cedit/
User's own temporary directory where block commands are processed User's own temporary directory where block commands are processed
and saved. and saved.
.PP .PP
.\"SKIP_SECTION"
.SH LICENSE .SH LICENSE
This program is distributed under the terms of the GNU General Public This program is distributed under the terms of the GNU General Public
License as published by the Free Software Foundation. See the built-in License as published by the Free Software Foundation. See the built-in