mirror of https://github.com/MidnightCommander/mc
Updates before the point where the manual mentions colors.
This commit is contained in:
parent
0da0c44f87
commit
a6a2ed7eae
123
doc/mcedit.1.in
123
doc/mcedit.1.in
|
@ -27,9 +27,8 @@ sign and the number).
|
|||
Force black and white display.
|
||||
.TP
|
||||
.I "\-c"
|
||||
Force color mode on terminals where
|
||||
.B mcedit
|
||||
defaults to black and white.
|
||||
Force ANSI color mode on terminals that don't seem to have color
|
||||
support.
|
||||
.TP
|
||||
.I "\-C <keyword>=<FGcolor>,<BGcolor>:<keyword>= ..."
|
||||
Specify a different color set. See the
|
||||
|
@ -44,11 +43,9 @@ Display the compiled-in search path for GNU Midnight Commander data
|
|||
files.
|
||||
.TP
|
||||
.I "\-t"
|
||||
Used only if the code was compiled with Slang and terminfo: it makes
|
||||
the Midnight Commander use the value of the
|
||||
.B TERMCAP
|
||||
variable for the terminal information instead of the information on
|
||||
the system wide terminal database.
|
||||
Force using termcap database instead of terminfo. This option is only
|
||||
applicable if GNU Midnight Commander was compiled with S-Lang library
|
||||
with terminfo support.
|
||||
.TP
|
||||
.I "\-V"
|
||||
Display the version of the program.
|
||||
|
@ -56,60 +53,58 @@ Display the version of the program.
|
|||
.I "\-x"
|
||||
Force xterm mode. Used when running on xterm-capable terminals (two
|
||||
screen modes, and able to send mouse escape sequences).
|
||||
.PP
|
||||
.SH FEATURES
|
||||
The internal file editor provides most of the features of common full
|
||||
screen editors. It has an extendable file size limit of sixteen
|
||||
megabytes and edits binary files flawlessly. The features it presently
|
||||
supports are: Block copy, move, delete, cut, paste;
|
||||
.I key for key undo;
|
||||
pull-down menus; file insertion; macro definition; regular expression
|
||||
search and replace (and our own scanf-printf search and replace);
|
||||
shift-arrow MSW-MAC text highlighting (if supported by the terminal);
|
||||
insert-overwrite toggle; word-wrap; a variety of tabbing options; syntax
|
||||
highlighting for various file types; and an option to pipe text blocks
|
||||
through shell commands like indent and ispell.
|
||||
.PP
|
||||
The internal file editor is a full-featured full screen editor. It can
|
||||
edit files up to 64 megabytes. It is possible to edit binary files.
|
||||
The features it presently supports are: block copy, move, delete, cut,
|
||||
paste; key for key undo; pull-down menus; file insertion; macro
|
||||
commands; regular expression search and replace (and our own
|
||||
scanf-printf search and replace); shift-arrow text highlighting (if
|
||||
supported by the terminal); insert-overwrite toggle; word wrap;
|
||||
autoindent; tunable tab size; syntax highlighting for various file
|
||||
types; and an option to pipe text blocks through shell commands like
|
||||
indent and ispell.
|
||||
.SH KEYS
|
||||
The editor is easy to use and can be used without learning. To see what
|
||||
keys do what, just consult the appropriate pull-down menu. Other keys
|
||||
are: Shift movement keys do text highlighting,
|
||||
The editor is easy to use and can be used without learning. The
|
||||
pull-down menu is invoked by pressing F9. You can learn other keys from
|
||||
the menu and from the buttor bar labels.
|
||||
.PP
|
||||
In addition to that, Shift combined with arrows does text highlighting
|
||||
(if supported by the terminal):
|
||||
.B Ctrl-Ins
|
||||
copies to the file
|
||||
.BR ~/.mc/cedit/cooledit.clip ,
|
||||
and
|
||||
.B Shift-Ins
|
||||
pastes from
|
||||
.BR ~/.mc/cedit/cooledit.clip .
|
||||
.BR ~/.mc/cedit/cooledit.clip ,
|
||||
.B Shift-Del
|
||||
cuts to
|
||||
.BR ~/.mc/cedit/cooledit.clip ,
|
||||
and
|
||||
.B Ctrl-Del
|
||||
deletes highlighted text - all if supported by the terminal. Mouse
|
||||
highlighting also works, and you can override the mouse as usual by
|
||||
holding down the shift key while dragging the mouse to let normal
|
||||
terminal mouse highlighting work.
|
||||
deletes highlighted text. Mouse highlighting also works on some
|
||||
terminals. To use the standard mouse support provided by your terminal,
|
||||
hold the Shift key. Don't forget that the mouse support in the terminal
|
||||
doesn't share the clipoard with
|
||||
.BR mcedit .
|
||||
.PP
|
||||
The completion key (usually
|
||||
.B "Alt-Tab"
|
||||
or
|
||||
.BR "Escape-Tab" )
|
||||
.BR "Escape Tab" )
|
||||
completes the word under the cursor using the words used earlier in the
|
||||
file.
|
||||
.PP
|
||||
To define a macro, press
|
||||
.B Ctrl-R
|
||||
and then type out the key
|
||||
strokes you want to be executed. Press
|
||||
and then type out the keys you want to be executed. Press
|
||||
.B Ctrl-R
|
||||
again when finished. You can then assign the macro to any key you like
|
||||
by pressing that key. The macro is executed when you press
|
||||
.B Ctrl-A
|
||||
and then the assigned key. The macro is also executed if you press
|
||||
Meta, Ctrl, or Esc and the assigned key, provided that the key is not
|
||||
used for any other function. Once defined, the macro commands go into
|
||||
the file
|
||||
used for any other function. The macro commands are stored in the file
|
||||
.BR ~/.mc/cedit/cooledit.macros .
|
||||
Do NOT edit this file if you are going to use macros again in the same
|
||||
editing session, because
|
||||
|
@ -132,8 +127,11 @@ will run ispell on a block of text in a similar way. The script file
|
|||
will be called
|
||||
.BR ~/.mc/cedit/edit.spell.rc .
|
||||
.PP
|
||||
Keys can be redefined from the Midnight Commander options menu.
|
||||
.PP
|
||||
If some keys don't work, you can use
|
||||
.B Learn Keys
|
||||
in the
|
||||
.B Options
|
||||
menu.
|
||||
.SH SYNTAX HIGHLIGHTING
|
||||
.B mcedit
|
||||
supports syntax highlighting. This means that keywords and contexts
|
||||
|
@ -144,27 +142,37 @@ The file
|
|||
.B ~/.mc/cedit/Syntax
|
||||
is rescanned on opening of a any new editor file. The file contains
|
||||
rules for highlighting, each of which is given on a separate line, and
|
||||
define which keywords will be highlighted to what color. The file is
|
||||
also divided into sections, each beginning with a line with the
|
||||
.B file
|
||||
command, followed by a regular expression. The regular expression
|
||||
dictates the file name that that set of rules applies to. Following
|
||||
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.
|
||||
define which keywords will be highlighted to what color.
|
||||
.PP
|
||||
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
|
||||
within the text that a particular set of rules belongs to. For instance,
|
||||
the region within a C style comment (i.e. between
|
||||
The file is divided into sections, each beginning with a line with the
|
||||
.B file
|
||||
command. The sections are normally put into separate files using the
|
||||
.B include
|
||||
command.
|
||||
.PP
|
||||
The
|
||||
.B file
|
||||
command has three arguments. The first argument is a regular expression
|
||||
that is applied to the file name to determine if the following section
|
||||
applies to the file. The second argument is the description of the file
|
||||
type. It is used in
|
||||
.BR cooledit ;
|
||||
future versions of
|
||||
.B mcedit
|
||||
may use it as well. The third optional argument is a regular expression
|
||||
to match the first line of text of the file. The rules in the following
|
||||
section apply if either the file name or the first line of text matches.
|
||||
.PP
|
||||
A section ends with the start of another section. Each section is
|
||||
divided 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, the text 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
|
||||
rules inside it because there is probably nothing that we want
|
||||
highlighted within a C comment.
|
||||
has its own color. This is a context, although it has no further rules
|
||||
inside it because there is probably nothing that we want highlighted
|
||||
within a C comment.
|
||||
.PP
|
||||
A trivial C programming section might look like this:
|
||||
.PP
|
||||
|
@ -310,7 +318,6 @@ A useful hint is to work with as much as possible with the things you
|
|||
can do rather than try to do things that this implementation can't deal
|
||||
with. Also remember that the aim of syntax highlighting is to make
|
||||
programming less prone to error, not to make code look pretty.
|
||||
.PP
|
||||
.SH COLORS
|
||||
The default colors may be changed by appending to the
|
||||
.B MC_COLOR_TABLE
|
||||
|
@ -323,7 +330,6 @@ editnormal=lightgray,black:\\
|
|||
editbold=yellow,black:\\
|
||||
editmarked=black,cyan"
|
||||
.fi
|
||||
.PP
|
||||
.SH OPTIONS
|
||||
Most options can now be set from the editors options dialog
|
||||
box. See the
|
||||
|
@ -390,7 +396,6 @@ original file, thus replacing it. The safest method is create backups
|
|||
(2). Where a backup file is created before any changes are made. You
|
||||
can specify your own backup file extension in the dialog. Note that
|
||||
saving twice will replace your backup as well as your original file.
|
||||
.PP
|
||||
.SH MISCELLANEOUS
|
||||
You can use scanf search and replace to search and replace a C format
|
||||
string. First take a look at the
|
||||
|
@ -430,7 +435,6 @@ binary files, you should set
|
|||
.B display bits
|
||||
to 7 bits in the Midnight Commander options menu to keep the
|
||||
spacing clean.
|
||||
.PP
|
||||
.SH FILES
|
||||
.I @prefix@/share/mc/mc.hlp
|
||||
.IP
|
||||
|
@ -460,7 +464,6 @@ from here instead of the system-wide startup file.
|
|||
.IP
|
||||
User's own temporary directory where block commands are processed
|
||||
and saved.
|
||||
.PP
|
||||
.SH LICENSE
|
||||
This program is distributed under the terms of the GNU General Public
|
||||
License as published by the Free Software Foundation. See the built-in
|
||||
|
@ -471,10 +474,8 @@ The latest version of this program can be found at
|
|||
ftp://ftp.ibiblio.org/pub/Linux/utils/file/managers/mc/.
|
||||
.SH SEE ALSO
|
||||
cooledit(1), mc(1), gpm(1), terminfo(1), scanf(3).
|
||||
.PP
|
||||
.SH AUTHORS
|
||||
Paul Sheer (psheer@obsidian.co.za) is the developer of
|
||||
the Midnight Commander's internal editor.
|
||||
.PP
|
||||
.SH BUGS
|
||||
Bugs should be reported to mc-devel@gnome.org
|
||||
|
|
Loading…
Reference in New Issue