mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-22 03:02:06 +03:00
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.
|
Force black and white display.
|
||||||
.TP
|
.TP
|
||||||
.I "\-c"
|
.I "\-c"
|
||||||
Force color mode on terminals where
|
Force ANSI color mode on terminals that don't seem to have color
|
||||||
.B mcedit
|
support.
|
||||||
defaults to black and white.
|
|
||||||
.TP
|
.TP
|
||||||
.I "\-C <keyword>=<FGcolor>,<BGcolor>:<keyword>= ..."
|
.I "\-C <keyword>=<FGcolor>,<BGcolor>:<keyword>= ..."
|
||||||
Specify a different color set. See the
|
Specify a different color set. See the
|
||||||
@ -44,11 +43,9 @@ Display the compiled-in search path for GNU Midnight Commander data
|
|||||||
files.
|
files.
|
||||||
.TP
|
.TP
|
||||||
.I "\-t"
|
.I "\-t"
|
||||||
Used only if the code was compiled with Slang and terminfo: it makes
|
Force using termcap database instead of terminfo. This option is only
|
||||||
the Midnight Commander use the value of the
|
applicable if GNU Midnight Commander was compiled with S-Lang library
|
||||||
.B TERMCAP
|
with terminfo support.
|
||||||
variable for the terminal information instead of the information on
|
|
||||||
the system wide terminal database.
|
|
||||||
.TP
|
.TP
|
||||||
.I "\-V"
|
.I "\-V"
|
||||||
Display the version of the program.
|
Display the version of the program.
|
||||||
@ -56,60 +53,58 @@ Display the version of the program.
|
|||||||
.I "\-x"
|
.I "\-x"
|
||||||
Force xterm mode. Used when running on xterm-capable terminals (two
|
Force 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
|
|
||||||
.SH FEATURES
|
.SH FEATURES
|
||||||
The internal file editor provides most of the features of common full
|
The internal file editor is a full-featured full screen editor. It can
|
||||||
screen editors. It has an extendable file size limit of sixteen
|
edit files up to 64 megabytes. It is possible to edit binary files.
|
||||||
megabytes and edits binary files flawlessly. The features it presently
|
The features it presently supports are: block copy, move, delete, cut,
|
||||||
supports are: Block copy, move, delete, cut, paste;
|
paste; key for key undo; pull-down menus; file insertion; macro
|
||||||
.I key for key undo;
|
commands; regular expression search and replace (and our own
|
||||||
pull-down menus; file insertion; macro definition; regular expression
|
scanf-printf search and replace); shift-arrow text highlighting (if
|
||||||
search and replace (and our own scanf-printf search and replace);
|
supported by the terminal); insert-overwrite toggle; word wrap;
|
||||||
shift-arrow MSW-MAC text highlighting (if supported by the terminal);
|
autoindent; tunable tab size; syntax highlighting for various file
|
||||||
insert-overwrite toggle; word-wrap; a variety of tabbing options; syntax
|
types; and an option to pipe text blocks through shell commands like
|
||||||
highlighting for various file types; and an option to pipe text blocks
|
indent and ispell.
|
||||||
through shell commands like indent and ispell.
|
|
||||||
.PP
|
|
||||||
.SH KEYS
|
.SH KEYS
|
||||||
The editor is easy to use and can be used without learning. To see what
|
The editor is easy to use and can be used without learning. The
|
||||||
keys do what, just consult the appropriate pull-down menu. Other keys
|
pull-down menu is invoked by pressing F9. You can learn other keys from
|
||||||
are: Shift movement keys do text highlighting,
|
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
|
.B Ctrl-Ins
|
||||||
copies to the file
|
copies to the file
|
||||||
.BR ~/.mc/cedit/cooledit.clip ,
|
.BR ~/.mc/cedit/cooledit.clip ,
|
||||||
and
|
|
||||||
.B Shift-Ins
|
.B Shift-Ins
|
||||||
pastes from
|
pastes from
|
||||||
.BR ~/.mc/cedit/cooledit.clip .
|
.BR ~/.mc/cedit/cooledit.clip ,
|
||||||
.B Shift-Del
|
.B Shift-Del
|
||||||
cuts to
|
cuts to
|
||||||
.BR ~/.mc/cedit/cooledit.clip ,
|
.BR ~/.mc/cedit/cooledit.clip ,
|
||||||
and
|
and
|
||||||
.B Ctrl-Del
|
.B Ctrl-Del
|
||||||
deletes highlighted text - all if supported by the terminal. Mouse
|
deletes highlighted text. Mouse highlighting also works on some
|
||||||
highlighting also works, and you can override the mouse as usual by
|
terminals. To use the standard mouse support provided by your terminal,
|
||||||
holding down the shift key while dragging the mouse to let normal
|
hold the Shift key. Don't forget that the mouse support in the terminal
|
||||||
terminal mouse highlighting work.
|
doesn't share the clipoard with
|
||||||
|
.BR mcedit .
|
||||||
.PP
|
.PP
|
||||||
The completion key (usually
|
The completion key (usually
|
||||||
.B "Alt-Tab"
|
.B "Alt-Tab"
|
||||||
or
|
or
|
||||||
.BR "Escape-Tab" )
|
.BR "Escape Tab" )
|
||||||
completes the word under the cursor using the words used earlier in the
|
completes the word under the cursor using the words used earlier in the
|
||||||
file.
|
file.
|
||||||
.PP
|
.PP
|
||||||
To define a macro, press
|
To define a macro, press
|
||||||
.B Ctrl-R
|
.B Ctrl-R
|
||||||
and then type out the key
|
and then type out the keys 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 like
|
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
|
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 you press
|
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
|
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
|
used for any other function. The macro commands are stored in 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
|
||||||
@ -132,8 +127,11 @@ will run ispell on a block of text in a similar way. The script file
|
|||||||
will be called
|
will be called
|
||||||
.BR ~/.mc/cedit/edit.spell.rc .
|
.BR ~/.mc/cedit/edit.spell.rc .
|
||||||
.PP
|
.PP
|
||||||
Keys can be redefined from the Midnight Commander options menu.
|
If some keys don't work, you can use
|
||||||
.PP
|
.B Learn Keys
|
||||||
|
in the
|
||||||
|
.B Options
|
||||||
|
menu.
|
||||||
.SH SYNTAX HIGHLIGHTING
|
.SH SYNTAX HIGHLIGHTING
|
||||||
.B mcedit
|
.B mcedit
|
||||||
supports syntax highlighting. This means that keywords and contexts
|
supports syntax highlighting. This means that keywords and contexts
|
||||||
@ -144,27 +142,37 @@ The file
|
|||||||
.B ~/.mc/cedit/Syntax
|
.B ~/.mc/cedit/Syntax
|
||||||
is rescanned on opening of a any new editor file. The file contains
|
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
|
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
|
define which keywords will be highlighted to what color.
|
||||||
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.
|
|
||||||
.PP
|
.PP
|
||||||
A section ends with the start of a new section. Each section is divided
|
The file is divided into sections, each beginning with a line with the
|
||||||
into contexts, and each context contains rules. A context is a scope
|
.B file
|
||||||
within the text that a particular set of rules belongs to. For instance,
|
command. The sections are normally put into separate files using the
|
||||||
the region within a C style comment (i.e. between
|
.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 /*
|
.B /*
|
||||||
and
|
and
|
||||||
.BR */ )
|
.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 has no further rules
|
||||||
rules inside it because there is probably nothing that we want
|
inside it because there is probably nothing that we want highlighted
|
||||||
highlighted within a C comment.
|
within a C comment.
|
||||||
.PP
|
.PP
|
||||||
A trivial C programming section might look like this:
|
A trivial C programming section might look like this:
|
||||||
.PP
|
.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
|
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
|
with. Also remember that the aim of syntax highlighting is to make
|
||||||
programming less prone to error, not to make code look pretty.
|
programming less prone to error, not to make code look pretty.
|
||||||
.PP
|
|
||||||
.SH COLORS
|
.SH COLORS
|
||||||
The default colors may be changed by appending to the
|
The default colors may be changed by appending to the
|
||||||
.B MC_COLOR_TABLE
|
.B MC_COLOR_TABLE
|
||||||
@ -323,7 +330,6 @@ editnormal=lightgray,black:\\
|
|||||||
editbold=yellow,black:\\
|
editbold=yellow,black:\\
|
||||||
editmarked=black,cyan"
|
editmarked=black,cyan"
|
||||||
.fi
|
.fi
|
||||||
.PP
|
|
||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
Most options can now be set from the editors options dialog
|
Most options can now be set from the editors options dialog
|
||||||
box. See the
|
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
|
(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
|
can specify your own backup file extension in the dialog. Note that
|
||||||
saving twice will replace your backup as well as your original file.
|
saving twice will replace your backup as well as your original file.
|
||||||
.PP
|
|
||||||
.SH MISCELLANEOUS
|
.SH MISCELLANEOUS
|
||||||
You can use scanf search and replace to search and replace a C format
|
You can use scanf search and replace to search and replace a C format
|
||||||
string. First take a look at the
|
string. First take a look at the
|
||||||
@ -430,7 +435,6 @@ 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
|
|
||||||
.SH FILES
|
.SH FILES
|
||||||
.I @prefix@/share/mc/mc.hlp
|
.I @prefix@/share/mc/mc.hlp
|
||||||
.IP
|
.IP
|
||||||
@ -460,7 +464,6 @@ from here instead of the system-wide startup file.
|
|||||||
.IP
|
.IP
|
||||||
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
|
|
||||||
.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
|
||||||
@ -471,10 +474,8 @@ The latest version of this program can be found at
|
|||||||
ftp://ftp.ibiblio.org/pub/Linux/utils/file/managers/mc/.
|
ftp://ftp.ibiblio.org/pub/Linux/utils/file/managers/mc/.
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
cooledit(1), mc(1), gpm(1), terminfo(1), scanf(3).
|
cooledit(1), mc(1), gpm(1), terminfo(1), scanf(3).
|
||||||
.PP
|
|
||||||
.SH AUTHORS
|
.SH AUTHORS
|
||||||
Paul Sheer (psheer@obsidian.co.za) is the developer of
|
Paul Sheer (psheer@obsidian.co.za) is the developer of
|
||||||
the Midnight Commander's internal editor.
|
the Midnight Commander's internal editor.
|
||||||
.PP
|
|
||||||
.SH BUGS
|
.SH BUGS
|
||||||
Bugs should be reported to mc-devel@gnome.org
|
Bugs should be reported to mc-devel@gnome.org
|
||||||
|
Loading…
Reference in New Issue
Block a user