cmds.gml

来自「开放源码的编译器open watcom 1.6.0版的源代码」· GML 代码 · 共 1,820 行 · 第 1/4 页

GML
1,820
字号
:PERIOD.
:BLANKLINE.
If &parm1 and
&parm2 are not specified, the a window containing a list
of all boolean values is displayed.
:BLANKLINE.
If &parm1 is specified
as a
:ITALICS.2
:CONT.,
then a window containing all other values is displayed.
:BLANKLINE.
From the selection window, a variable may be selected (with ENTER or
double clicking the mouse), and a
new value entered. If the variable was boolean, then pressing
ENTER or double clicking toggles the value.
:BLANKLINE.
If a variable is a boolean variable, then it is be set via
:ILLUST.
set var    - set var to TRUE
set novar  - set var to FALSE
:eILLUST.
:BLANKLINE.
Variables other than boolean variables are set via
:ILLUST.
set var = test  - set var to 'test'
set var  test   - set var to 'test'
:eILLUST.
Note that the '=' operator is optional.
:BLANKLINE.
For information on all the different settable options,
see the chapter
:HDREF refid='edset'.
:PERIOD.
:eFUNC.

:FUNC.SETCOLOR
:SYNTAX.* SETCOLOR <c> <r> <g> <b>
Set the color number &parm1 to have the RGB value &parm2, &parm3, &parm4.
:PERIOD.
&parm1 may have a value of 0 to 15.
&parm1, &parm2, and &parm3 may have values from 0 to 63.
:BLANKLINE.
This command only has an affect under operating systems where it is possible
to remap the colors in some way (DOS).
:EXAMPLE.setcolor 1 63 0 38
This remaps color number 1 to a pink color.
:EXAMPLE.setcolor 15 25 40 38
This remaps color number 15 to a pale green color.
:eFUNC.

:FUNC.SHELL
:SYNTAX.* SHell
Escapes to an operating system shell.
:SEEALSO.
:SEE.!
:SEE key=1.!
:eSEEALSO.
:eFUNC.

:FUNC.SIZE
:SYNTAX.* SIZE <x1> <y1> <x2> <y2>
Resizes the current edit buffer window to have upper left-hand corner at
(&parm1,&parm2) and lower right-hand corner at (&parm3,&parm4).
:EXAMPLE.SIZE 0 0 10 10
Changes the size of the current edit buffer window to have
upper left-hand corner at (0,0) and lower right-hand corner at (10,10).
:SEEALSO.
:SEE.cascade
:SEE.maximize
:SEE.minimize
:SEE.movewin
:SEE.resize
:SEE.tile
:eSEEALSO.
:eFUNC.

:FUNC.SOURCE
:SYNTAX.* SOurce <script> <p1> <p2> ... <pn>
Execute &edname source
:KEYWORD.script
file &parm1.
:PERIOD.
Optional parameters &parm2 to
&parm5 may be specified, these are passed to the specified
:KEYWORD.script
:PERIOD.
:BLANKLINE.
If "." is specified as the
:KEYWORD.script
name, the current
file being edited is run as a 
:KEYWORD.script
:PERIOD.
:BLANKLINE.
For information on editor
:KEYWORD.scripts
:CONT.,
see the chapter
:HDREF refid='scripts'.
:PERIOD.
:EXAMPLE.source foo.vi abc
Executes the
:KEYWORD.script
:ITALICS.foo.vi
:CONT.,
passing it the parm
:ITALICS.abc
:PERIOD.
:EXAMPLE.source .
Executes the current edit buffer as a
:KEYWORD.script
:PERIOD.
:SEEALSO.
:SEE.compile
:SEE.load
:eSEEALSO.
:eFUNC.

:FUNC.SUBSTITUTE
:SYNTAX.<line_range> Substitute /<regexp>/<replexp>/<g><i>
Over the line range &range,
replace each occurrence of regular expression
:CMDPARM.<regexp>
with the replacement expression
:CMDPARM.<replexp>
:PERIOD.
:BLANKLINE.
Only the first occurrence on each line is replaced, unless
:CMDPARM.<g>
is specified, in which case all occurrences on a line are replaced.
:BLANKLINE.
If
:CMDPARM.<i>
is specified, each replacement is verified before it is performed.
:BLANKLINE.
See the chapter
:HDREF refid='rxchap'.
for more information on regular expression matching and substitution.
:EXAMPLE.%s/foo/bar/
Changes the first occurrence of
:ITALICS.foo
to
:ITALICS.bar
on each line of the entire file.
:EXAMPLE.1,.s/(([a-z]bc)*)/Abc\2/g
Changes all occurrences of the regular expression
:ITALICS.(([a-z]bc)*)
to the substitution expression
:ITALICS.Abc\2
:PERIOD.
The changes are only applied on lines 1 to the current line of the
current edit buffer.
:EXAMPLE.'a,'b/^abc//i
Any line that starts with
:ITALICS.abc
has the
:ITALICS.abc
changed to the null string.
The user is prompted before each change.  The changes are only applied
from the line containing mark
:ITALICS.a
to the line containing mark
:ITALICS.b
:PERIOD.
:SEEALSO.
:SEE.global
:eSEEALSO.
:eFUNC.

:FUNC.TAG
:SYNTAX.* TAG <tagname>
Searches for the tag &parm1.
:PERIOD.
Tags are kept in a special file,
which must be located somewhere in your path.
This file is controlled with the
:KEYWORD.tagfilename
setting; the default for this setting is
:ITALICS.tags
:PERIOD.
The tags file contains a collection of procedure names and typedefs,
along with the file in which they are located and a search command/line
number with which to exactly locate the tag.
:BLANKLINE.
See the appendix
:HDREF refid='ctags'
for more information.
:EXAMPLE.tag MyFunc
Locates the tag
:ITALICS.MyFunc
in the tags file, edits the source file that contains the function
:ITALICS.MyFunc
:CONT.,
and moves the cursor to the definition of the function in the source file.
:SEEALSO.
:SEE key=1.^]
:eSEEALSO.
:eFUNC.

:FUNC.TILE
:SYNTAX.* TILE '"h"' '|' '"v"' '|' <x> <y>
Tile all current file windows.  The tiling layout is specified
as an &parm5 by &parm6  grid.  The or bars ('|') in the command
syntax indicate that only one of the options may be used.
:BLANKLINE.
If no parameters are specified,
:KEYWORD.maxwindowtilex
and
:KEYWORD.maxwindowtiley
are used (this is the default tile grid).
:BLANKLINE.
If &parm1 is specified,
then files are tiled horizontally (as many as will fit).
:BLANKLINE.
If &parm3 is specified, then files are tiled vertically (as many as will fit).  
:BLANKLINE.
Specifying &parm5 &parm6 overrides the default tile grid. As a special
case, specifying &parm5 &parm6 as 1 1 causes all windows to be restored.
:EXAMPLE.tile 3 5
Tile windows 3 across and 5 high.
:EXAMPLE.tile 1 1
Untile windows.
:EXAMPLE.tile h
Tile windows horizontally.
:EXAMPLE.tile
Tile windows according to default tile grid.
:SEEALSO.
:SEE.cascade
:SEE.maximize
:SEE.minimize
:SEE.resize
:SEE.size
:SEE.movewin
:eSEEALSO.
:eFUNC.

:FUNC.UNABBREV
:SYNTAX.* UNABbrev <abbrev>
Removes the abbreviation &parm1.
:PERIOD.
See the
:KEYWORD.abbrev
command for how to set an abbreviation.
:EXAMPLE.unabbrev wh
Remove the abbreviation
:ITALICS.wh
:PERIOD.
:SEEALSO.
:SEE.abbrev
:eSEEALSO.
:eFUNC.

:FUNC.UNALIAS
:SYNTAX.* UNALias <alias>
Removes the &cmdline alias &parm1.
:PERIOD.
See the
:KEYWORD.alias
command for how to set a &cmdline alias.
:EXAMPLE.unalias ai
Remove the &cmdline alias
:ITALICS.ai
:PERIOD.
:SEEALSO.
:SEE.alias
:eSEEALSO.
:eFUNC.

:FUNC.UNDO
:SYNTAX.* Undo '"!"'
Undo the last change.  There is no limit on the number of undo's
that can be saved, except for memory.  Continuing to issue undo commands
walks you backwards through your edit history.
:BLANKLINE.
Specifying &parm1 undoes the last undo (redo).  Again, there are no
restrictions on this.  However, once you modify the file, you can longer undo the
last undo.
:SEEALSO.
:SEE key=1.u
:SEE key=1.U
:eSEEALSO.
:eFUNC.

:FUNC.UNMAP
:SYNTAX.* UNMAP '"!"' <key>
Removes the mapping of the key &parm2 for &cmdmode
:PERIOD.
If &parm1 is specified, then the key mapping is removed for &tinsmode
:PERIOD.
See the
:KEYWORD.map
command for details on mapping keys.
:BLANKLINE.
There are a number of pre-defined
symbols that are recognized for &parm1.
:PERIOD.
These are described in the Appendix
:HDREF refid='symkey'.
:PERIOD.
:EXAMPLE.unmap CTRL_W
Removes the mapping of CTRL_W for &cmdmode
:PERIOD.
Pressing CTRL_W in command
mode will now do the default action.
:EXAMPLE.unmap! F1
Removes the mapping of F1 for &tinsmode
:PERIOD.
Typing F1 in &tinsmode will now do the default action.
:SEEALSO.
:SEE.map
:SEE.mapbase
:eSEEALSO.
:eFUNC.

:FUNC.VERSION
:SYNTAX.* VERsion
Displays the current version of &edname in the message window.
:SEEALSO.
:SEE key=1.^V
:eSEEALSO.
:eFUNC.

:FUNC.VIEW
:SYNTAX.* VIEw '"!"' <file_name>
Functions the same as the
:KEYWORD.edit
command, except that it causes the file edited to be a "view only"
file (no modification commands work).
:EXAMPLE.view test.c
Edits the file
:ITALICS.test.c
in view-only mode.
:SEEALSO.
:SEE.edit
:SEE.open
:SEE.visual
:eSEEALSO.
:eFUNC.

:FUNC.VISUAL
:SYNTAX.* VIsual <file_name>
Causes &edname to re-enter visual mode (full screen editing mode)
if &edname is in
:KEYWORD pc=1.EX mode
:PERIOD.
If the filename &parm1 is specified,
this functions just like the
:KEYWORD.edit
command.
:EXAMPLE.vi test.c
Return to full screen editing mode (if in
:KEYWORD pc=1.EX mode
:CONT.)
and edit the file
test.c
:EXAMPLE.vi
Return to full screen editing mode (if in
:KEYWORD pc=1.EX mode
:CONT.)
:PERIOD.
:SEEALSO.
:SEE.edit
:SEE.open
:SEE.view
:eSEEALSO.
:eFUNC.

:FUNC.WRITE
:SYNTAX.<line_range> Write '"!"' <file_name>
Writes the specified range of lines &range to the file &parm2.
:PERIOD.
:BLANKLINE.
If no line range is specified, then all lines are written.
:BLANKLINE.
If &parm2 is not specified, then the current file is written.
If &parm2 exists, and is not the name of the file that you are writing,
then the write will fail.
:BLANKLINE.
Specifying &parm1 forces an overwrite of an existing file.
:EXAMPLE.1,10 w! test.c
Write the first 10 lines of the current file to the file
:ITALICS.test.c
:CONT.,
and overwrite
:ITALICS.test.c
if it already exists.
:EXAMPLE.w
Write out the current file.
:SEEALSO.
:SEE.quit
:SEE.wq
:SEE.xit
:SEE key=1.Z
:eSEEALSO.
:eFUNC.

:FUNC.WQ
:SYNTAX. * WQ
Writes current file, and exits.
:SEEALSO.
:SEE.quit
:SEE.write
:SEE.xit
:SEE key=1.Z
:eSEEALSO.
:eFUNC.

:FUNC.YANK
:SYNTAX.<line_range> Yank <buffer>
Yank (make a copy of) the specified line range &range.
:PERIOD.
:BLANKLINE.
If &parm1 is not specified, the text is yanked (copied) into the active
&copybuffer
:PERIOD.
:BLANKLINE.
If &parm1 ('1'-'9', or 'a'-'z') is specified, the text is yanked into
that &copybuffer
:PERIOD.
:BLANKLINE.
The
:KEYWORD.put
command may be used to place the contents of a &copybuffer into the file.
:EXAMPLE.% y
Yanks (copies) all lines into the active &copybuffer
:PERIOD.
:EXAMPLE..,$ y z
Yanks the lines from the current line to the last line in the file
into the &copybuffer
:ITALICS.z
:PERIOD.
:SEEALSO.
:SEE.delete
:SEE.put
:SEE key=1.d
:SEE key=1.y
:SEE key=1.p
:SEE key=1.P
:eSEEALSO.
:eFUNC.

:FUNC.XIT
:SYNTAX.Xit
Exits the current file, saving it if it has been modified.
:SEEALSO.
:SEE.quit
:SEE.write
:SEE.wq
:SEE key=1.Z
:eSEEALSO.
:eFUNC.

:eFNLIST.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?