settings.gml
来自「开放源码的编译器open watcom 1.6.0版的源代码」· GML 代码 · 共 793 行 · 第 1/2 页
GML
793 行
.*
.* (c) Copyright 1992 by WATCOM International Corp.
.*
.* All rights reserved. No part of this publication may be reproduced or
.* used in any form or by any means - graphic, electronic, or mechanical,
.* including photocopying, recording, taping or information storage and
.* retrieval systems - without written permission of WATCOM Publications
.* Limited.
.*
.* Date By Reason
.* ---- -- ------
.* 30-jul-92 Craig Eisler initial draft
.*
:set symbol="guionly" value="This option is only valid with the GUI versions of the editor.".
:set symbol="charonly" value="This option is only valid with the character mode versions of the editor.".
:CHAPTER id='edset'.Editor Settings
This chapter describes the various options that may be controlled using
&edname.'s set command. Options are typically set in the
:KEYWORD.configuration script
:CONT.;
however, options are settable at execution time as well.
:P.
If you know the option you wish to set, you may just issue the
:KEYWORD.set
command directly at the command prompt, e.g.:
:ILLUST.
set nocaseignore
set autosaveinterval=10
:eILLUST.
:P.
A boolean option is set in the following way:
:ILLUST.
set autoindent - turns on autoindent
set noautoindent - turns off autoindent
:eILLUST.
Short forms may also be used; for example:
:ILLUST.
set ai - turns on autoindent
set noai - turns off autoindent
:eILLUST.
:P.
A non-boolean option may be set in the following way:
:ILLUST.
set filename=test.c - sets current filename to 'test.c'
set filename test2.c - sets current filename to 'test2.c'
:eILLUST.
Note that the assignment operator '=' is optional.
:P.
If you do not know the boolean option you wish to set, you may issue the
set command with no option at the command prompt, e.g.:
:ILLUST.
set
:eILLUST.
This will cause a menu of all possible settings to appear. These
values may be changed by either cursoring to the desired one and pressing
enter, or by double clicking on the desired one with the mouse. Boolean
settings will toggle between TRUE and FALSE. Selecting any other setting
will cause a window to pop up, displaying the old
value and prompting you for the new value. This window may be cancelled
by pressing the ESC key.
:picture file='set' text='&edname Settings Selection List'.
:P.
When you are finished with the settings menus, you may close the window
by pressing the
:HILITE.ESC
key.
:SECTION id='boolset'.Boolean Settings
:SETLIST.
:SETCMD short=ai.autoindent
In text insertion mode, &cmd_long causes the cursor to move to
start of previous line when a new line is started.
In &cmdmode, &cmd_long causes the cursor to go to the first non
white-space when ENTER is pressed.
:SETCMD short=ac.automessageclear
Automatically erases the message window when a key is typed in &cmdmode
:PERIOD.
:SETCMD short=bf.beepflag
&edname normally beeps when an error is encountered. Setting &nocmd_long
disables the beeping.
:SETCMD short=ci.caseignore
Causes all searches to be case insensitive if set.
:SETCMD short=cv.changelikevi
If set, then the change command behaves like vi, i.e.
if ESC is pressed when no change has been made, the text is deleted.
Normally, pressing ESC cancels the change without deleting the text.
:SETCMD short=cm.cmode
When cmode is set, certain things will happen when you are entering text:
:OL.
:LI.After entering a line ending in '{', the next line will be indented a
:KEYWORD.shiftwidth
further than the current one.
:LI.After entering a line ending in '}', the current line is shifted to match the
indentation of the line with the matching '{'. The cursor will flash for
a brief instant on the matching '{' if
:KEYWORD.showmatch
is set.
:LI.All lines entered will have trailing white space trimmed off.
:LI."case" and "default" statements are shifted to be aligned with switch
statements.
:eOL.
:ADDLINE.
Each file has its own &cmd_long. setting; so setting &cmd_long in one file
and not in another (during the same editing session) will work.
:ADDLINE.
One thing that is useful is to add the following lines to your read
:KEYWORD.hook script
:CONT.:
:ILLUST.
if %E == .c
set cmode
else
set nocmode
endif
:eILLUST.
This will cause cmode to be set if the file has a .c extension, and not
to be set for any other type of file.
:SETCMD short=cs.columninfilestatus
Causes the current column to be added to file status display
(obtained when typing ^G).
:SETCMD short=ct.currentstatus
Enables the display of the current status on the menu bar. The position
on the menu bar is controlled with
:KEYWORD.currentstatuscolumn
:PERIOD.
:SETCMD short=dt.drawtildes
If &cmd_long is true, then the all lines displayed that do not have any
data associated with them will have a tilde ('~') displayed on the line.
If &cmd_long is false, then no tidles will be displayed and the string
:KEYWORD. fileendstring
will be displayed after the last line with data.
:SETCMD short=eb.eightbits
If &cmd_long is set, then all characters are displayed as normal. If
&nocmd_long is set then non-printable ASCII will be displayed as control
characters.
:SETCMD short=em.escapemessage
Display the current file status whenever the
:HILITE.ESC
key is pressed in &cmdmode
:PERIOD.
:SETCMD short=xm.extendedmemory
If &cmd_long is set, extended memory is used if it is present
(standard extended, EMS, XMS). This option applies to the real-mode
DOS version of &edname only.
:SETCMD short=iz.ignorectrlz
Normally, a ^Z in a file acts as an end-of-file indicator. Setting
&cmd_long causes &edname to treat ^Z as just another character in
the file. This option may also be selected using the '-z' option
when invoking &edname.
:PERIOD.
:SETCMD short=it.ignoretagcase
When using the "-t" command line option of &edname, the tag that is matched
is normally case sensitive. Setting &cmd_long causes the tag matching
to be case insensitive.
:SETCMD short=ma.magic
If &cmd_long is set, then all special characters in a regular expression
are treated as "magic", and must be escaped to be used in an ordinary
fashion. If &nocmd_long is set, then any special characters in
:KEYWORD. magicstring
are NOT treated as magic characters by the regular expression
handler, and must be escaped to have special meaning.
:BLANKLINE.
Magic characters are:
:MONO.^$.[()|?+*\~@
:SETCMD short=ps.pauseonspawnerr
This option, if set, causes &edname to pause after spawning (running
a system command)
if there was an error, even if the system command was spawned from a script.
Normally, a command spawned from a script
does not pause when control returns to the editor.
:SETCMD short=qu.quiet
When running in quiet mode, &edname does not update the screen. This
is useful when running a complex script,
so that the activity of the
editor is hidden. This option may be selected when invoking
&edname by using the '-q' switch, causing &edname to run in a 'batch mode'.
:SETCMD short=qf.quitmovesforward
If this option is set, then when a file is quit, the next file in the list
of files is moved to. Otherwise, the previous file in the list of files
is moved to.
:SETCMD short=rf.readentirefile
If &cmd_long is set, then the entire file is read into memory when
it is edited. This is the default setting. However, if &nocmd_long
is set, then the file is only read into memory as it is needed. This
option is useful when you only want to look at the first few pages of
a large file. This option may be selected when invoking &edname by
using the '-n' switch.
:SETCMD short=rc.readonlycheck
This option causes &edname to complain about modifications to
read-only files every time the file is modified.
:SETCMD short=rt.realtabs
If &nocmd_long is set, then tabs are expanded to spaces when the
file is read.
:SETCMD short=rm.regsubmagic
If &nocmd_long is set, then escaped characters have no meaning
in regular expression substitution expressions.
:SETCMD short=sc.samefilecheck
Normally, &edname just warns you if you edit a file twice
(with a different path). If &cmd_long is set, then if you
edit a file that is the same as a file already being edited (only you
specified a different path), then that file will be brought up, rather
than a new copy being read in.
:SETCMD short='sn'.saveconfig
If this option is set, then the editor's configuration (fonts, colors,
settings, etc) is saved when the editor is exited.
:BLANKLINE.
&guionly
:SETCMD short='so'.saveposition
If this option is set, then the editor's position and size is saved
when the editor is exited, and restored the next time the editor
is started.
:BLANKLINE.
&guionly
:SETCMD short=sw.searchwrap
When searching a file, &edname normally wraps around the top or bottom
of the file. If &nocmd_long is set, then &edname terminates its searches
once it reaches the top or bottom of the file.
:SETCMD short=sm.showmatch
If &cmd_long is set, the &edname briefly moves the cursor to a matching '('
whenever a ')' is typed while entering text. Also, the matching '{' is
shown if a '}' is typed if
:KEYWORD.cmode
is set.
:SETCMD short=tp.tagprompt
If a more than one instance of a tag is found in the tags file, a
list of choices is displayed if &cmd_long is set.
:SETCMD short=un.undo
Setting &nocmd_long disables &edname.'s undo ability.
:SETCMD short=ve.verbose
If enabled, this option causes &edname to display extra messages
while doing involved processing.
:SETCMD short=ww.wordwrap
If enabled, word movement commands ('w','W','b','B') will wrap
to the next or previous line.
:SETCMD short=ws.wrapbackspace
If this option is set, pressing backspace while on column one of
a line will cause &edname to wrap to the end of the previous line
(while in
:KEYWORD.text insertion mode
:CONT.).
:SETCMD short=wl.writecrlf
Normally, lines are written with carriage return and line feeds at the
end of each line. If &nocmd_long is set, the lines are written
with only a line feed at the end.
:eSETLIST.
:SUBSECT.Mouse Control
:SETLIST.
:SETCMD short=lm.lefthandmouse
When &cmd_long is set, the right and left mouse buttons are inverted.
:SETCMD short=um.usemouse
This option enables/disables the use of the mouse in &edname..
:eSETLIST.
:eSUBSECT.
:SUBSECT.Window Control
:SETLIST.
:SETCMD short=cl.clock
This enables/disables the clock display. The position of the clock
is controlled by the
:KEYWORD.clockx
and
:KEYWORD.clocky
set commands.
:SETCMD short=ln.linenumbers
This option turns on the line number window. This window is
displayed on the left-hand side of the edit window by default, unless
:KEYWORD.linenumsonright
is set.
:SETCMD short=lr.linenumsonright
Setting &cmd_long causes the line number window to appear on the
right-hand side of the edit window.
:SETCMD short=ml.marklonglines
If this option is set, than any line that exceeds the with of the screen
has the last character highlighted. If
:KEYWORD.endoflinechar
is a non-zero ASCII value, then the last character is displayed as that
ASCII value.
:SETCMD short=me.menus
This option enables/disables the menu bar.
:SETCMD short=ri.repeatinfo
Normally, &edname echos the repeat count in the
:KEYWORD.countwindow
as it is typed. Setting &nocmd_long disables this feature.
:SETCMD short=sp.spinning
If set, this option enables the busy-spinner. Whenever the editor is busy,
a spinner will appear. The position of the spinner is controlled using
the
:KEYWORD.spinx
and the
:KEYWORD.spiny
set commands.
:SETCMD short=si.statusinfo
If set, this option enables the status info window. This window
contains the current line and column, and is controlled using the
:KEYWORD.statuswindow
window command.
:SETCMD short=tb.toolbar
This option enables/disables the toolbar.
:BLANKLINE.
&guionly
:SETCMD short=wg.windowgadgets
This option enables/disables gadgets on edit session windows.
:eSETLIST.
:eSUBSECT.
:SECTION id='nonbset'.Non-Boolean Settings
:SETLIST.
:SETCMD parm=seconds.autosaveinterval
Sets the number of seconds between autosaves of the current file to the
backup directory. Autosave is disabled if &cmd_parm is 0. The backup
&cmd_short
directory is defined using the
:KEYWORD.tmpdir
parameter.
:SETCMD parm=size.commandcursortype
Sets the size of the cursor when in &cmdmode.
:PERIOD.
Values for &cmd_parm are 0 to 100 (0=full size, 100=thin).
:SETCMD parm=ascii_val.endoflinechar
If
:KEYWORD.marklonglines
is set, and &cmd_parm is non-zero, then the character in the last column
of a line wider than the screen is displayed as the ASCII value &cmd_parm.
:PERIOD.
:SETCMD parm=attr.exitattr
Defines the attribute to be assigned to the screen when &edname is exited.
The attribute is composed of a foreground and a background color,
(16*background+ foreground gives &cmd_parm). The default
is 7 (white text, black background).
:P.
&charonly.
:SETCMD parm=string.fileendstring
If
:KEYWORD.drawtildes
is false, then the character string &cmd_parm
will be displayed after the last line with data.
:SETCMD parm=rexexp.grepdefault
Default files to search when using the
:KEYWORD.fgrep
or
:KEYWORD.egrep
commands.
&cmd_parm is a file matching regular expression, the default is *.(c|h)
For more information, see the section
:HDREF refid='fmrx'.
in the chapter
:HDREF page=no refid='rxchap'
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?