modes.gml
来自「开放源码的编译器open watcom 1.6.0版的源代码」· GML 代码 · 共 2,044 行 · 第 1/4 页
GML
2,044 行
:ITALICS.<n>
lines.
:KEY.CTRL_P <n>CTRL_P
Move the cursor to the previous line. If a repeat count
:ITALICS.<n>
is specified, then you are moved up
:ITALICS.<n>
lines.
:KEY.CTRL_U <n>CTRL_U
Move up a certain number of lines. The default is to move up
half a page. If the repeat count
:ITALICS.<n>
is specified, then that becomes the number of lines moved from then on.
Also see the
:HILITE.CTRL_D
key.
:KEY.CTRL_Y <n>CTRL_Y
Expose the line above the first line in the current edit window,
leaving the cursor on the same line if possible. If a repeat
count
:ITALICS.<n>
is specified, then that many lines are exposed.
:KEY.B <n>B
Moves the cursor backwards to the start of previous space delimited word
on the current line.
:EXAMPLE.B
If the cursor was on the right parenthesis (')') of
:ILLUST.
x = foo(abc) + 3;
:eILLUST.
then the cursor moves to the
:ITALICS.f
in
:ITALICS.foo
:PERIOD.
:EXAMPLE.2B
If the cursor was on the right parenthesis (')') of
:ILLUST.
x = foo(abc) + 3;
:eILLUST.
then the cursor moves to the
:ITALICS.=
sign.
:KEY.b <n>b
Moves the cursor backwards to the start of the previous word on the
current line.
:INCLUDE file='worddef'.
:EXAMPLE.b
If the cursor was on the right parenthesis (')') of
:ILLUST.
x = foo(abc) + 3;
:eILLUST.
then the cursor moves to the letter
:ITALICS.a
in
:ITALICS.abc
:PERIOD.
:EXAMPLE.2b
If the cursor was on the right parenthesis (')') of
:ILLUST.
x = foo(abc) + 3;
:eILLUST.
then the cursor moves to left parenthesis
:ITALICS.(
:PERIOD.
:KEY.E <n>E
Moves the cursor to the end of the next space delimited word on the
current line.
:EXAMPLE.E
If the cursor was on the letter
:ITALICS.f
in
:ILLUST.
x = foo(abc) + 3;
:eILLUST.
then the cursor moves to the right parenthesis
:ITALICS.)
:PERIOD.
:EXAMPLE.2E
If the cursor was on the letter
:ITALICS.f
in
:ILLUST.
x = foo(abc) + 3;
:eILLUST.
then the cursor moves to the
:ITALICS.+
sign.
:KEY.e <n>e
Moves the cursor to the end of the next word on the current line.
:INCLUDE file='worddef'.
:EXAMPLE.e
If the cursor was on the letter
:ITALICS.f
in
:ILLUST.
x = foo(abc) + 3;
:eILLUST.
then the cursor moves to the second letter
:ITALICS.o
in
:ITALICS.foo
:PERIOD.
:EXAMPLE.2e
If the cursor was on the letter
:ITALICS.f
in
:ILLUST.
x = foo(abc) + 3;
:eILLUST.
then the cursor moves to the left parenthesis
:ITALICS.(
:PERIOD.
:KEY.F <n>F<?>
Moves the cursor backwards from its current position to the character
:ITALICS.<?>
on the current line. If a repeat count
:ITALICS.<n>
is specified, then the nth occurrence of the character
:ITALICS.<?>
is moved to.
:EXAMPLE.F+
If the cursor is on the semi-colon (';') in
:ILLUST.
x = foo(abc) + 3;
:eILLUST.
The the cursor is moved to the
:ITALICS.+
sign.
:EXAMPLE.2Fo
If the cursor is on the semi-colon (';') in
:ILLUST.
x = foo(abc) + 3;
:eILLUST.
The the cursor is moved to the first
:ITALICS.o
in
:ITALICS.foo
:PERIOD.
:KEY.f <n>f<?>
Moves the cursor forwards from its current position to the character
:ITALICS.<?>
on the current line. If a repeat count
:ITALICS.<n>
is specified, then the
:ITALICS.nth
occurrence of the character
:ITALICS.<?>
is moved to.
:EXAMPLE.f+
If the cursor is on the character
:ITALICS.x
in
:ILLUST.
x = foo(abc) + 3;
:eILLUST.
The the cursor is moved to the
:ITALICS.+
sign.
:EXAMPLE.2fo
If the cursor is on the character
:ITALICS.x
in
:ILLUST.
x = foo(abc) + 3;
:eILLUST.
The the cursor is moved to the second
:ITALICS.o
in
:ITALICS.foo
:PERIOD.
:KEY.G <n>G
Goes to the line specified by the repeat count
:ITALICS.<n>
:PERIOD.
If no repeat count is specified, you move the the last line in the
current edit buffer.
:EXAMPLE.100G
Moves to line 100 in the current edit buffer.
:EXAMPLE.G
Moves to the last line in the current edit buffer.
:KEY.h <n>h
Move the cursor left one character. If
:ITALICS.<n>
is specified, the cursor moves left
:ITALICS.<n>
characters.
:KEY.H <n>H
Moves to the line at the top of the current file window. If
a repeat count is specified, then you are moved to that line relative
to the top of the current file window.
:EXAMPLE.2H
Moves to the second line from the top of the current file window.
:EXAMPLE.H
Moves to the line at the top of the current file window.
:KEY.j <n>j
Move the cursor down one line.
:ITALICS.<n>
is specified, the cursor moves down
:ITALICS.<n>
lines.
:KEY.k <n>k
Move the cursor up one line.
:ITALICS.<n>
is specified, the cursor moves up
:ITALICS.<n>
lines.
:KEY.L <n>L
Moves to the line at the bottom of the current file window. If
a repeat count is specified, then you are moved to that line relative
from the bottom of the current file window.
:EXAMPLE.2L
Moves to the second line from the bottom of the current file window.
:EXAMPLE.L
Moves to the line at the bottom of the current file window.
:KEY.l <n>l
Move the cursor right one character. If
:ITALICS.<n>
is specified, the cursor moves right
:ITALICS.<n>
characters.
:KEY.M M
Moves the cursor to the line in the middle of the current file window.
:KEY.T <n>T<?>
Moves the cursor backwards from its current position to the character
after the character
:ITALICS.<?>
on the current line. If a repeat count
:ITALICS.<n>
is specified, then the the character after the nth
occurrence of the character
:ITALICS.<?>
is moved to.
:EXAMPLE.T+
If the cursor is on the semi-colon (';') in
:ILLUST.
x = foo(abc) + 3;
:eILLUST.
The the cursor is moved to the space after the
:ITALICS.+
sign.
:EXAMPLE.2To
If the cursor is on the semi-colon (';') in
:ILLUST.
x = foo(abc) + 3;
:eILLUST.
The the cursor is moved to the second
:ITALICS.o
in
:ITALICS.foo
:PERIOD.
:KEY.t <n>t<?>
Moves the cursor forwards from its current position to the character before
the character
:ITALICS.<?>
on the current line. If a repeat count
:ITALICS.<n>
is specified, then the the character before the nth
occurrence of the character
:ITALICS.<?>
is moved to.
:EXAMPLE.t+
If the cursor is on the character
:ITALICS.x
in
:ILLUST.
x = foo(abc) + 3;
:eILLUST.
The the cursor is moved to the space before
:ITALICS.+
sign.
:EXAMPLE.2to
If the cursor is on the character
:ITALICS.x
in
:ILLUST.
x = foo(abc) + 3;
:eILLUST.
The the cursor is moved to the first
:ITALICS.o
in
:ITALICS.foo
:PERIOD.
:KEY.W <n>W
Moves the cursor forward to the start of the next space delimited word
on the current line.
:EXAMPLE.W
If the cursor was on the letter
:ITALICS.f
in
:ILLUST.
x = foo(abc) + 3;
:eILLUST.
then the cursor moves to the
:ITALICS.+
sign.
:EXAMPLE.2W
If the cursor was on the letter
:ITALICS.f
in
:ILLUST.
x = foo(abc) + 3;
:eILLUST.
then the cursor moves to the number
:ITALICS.3
:PERIOD.
:KEY.w <n>w
Moves the cursor forward to the start of the next word on the current
line.
:INCLUDE file='worddef'.
:EXAMPLE.w
If the cursor was on the letter
:ITALICS.f
in
:ILLUST.
x = foo(abc) + 3;
:eILLUST.
then the cursor moves to the left parenthesis
:ITALICS.(
:PERIOD.
:EXAMPLE.2w
If the cursor was on the letter
:ITALICS.f
in
:ILLUST.
x = foo(abc) + 3;
:eILLUST.
then the cursor moves to the letter
:ITALICS.a
in
:ITALICS.abc
:PERIOD.
:eKEYLIST.
:eCMSECT.
:CMSECT id=cmundo.Undoing Changes
&edname keeps an undo history of all changes made to an edit buffer.
There is no limit on the number of undos, as long as there is enough
memory to save the undo information. If there is not enough memory
to save undo information for the current action, then the oldest undo
information is removed until enough memory has been released.
:P.
There is also an undo-undo (redo) history: as you issue undo commands,
the information to redo the undo is kept. However, once you modify the
file other than by doing an undo, the redo history is lost.
:P.
As you issue undo commands, a message indicating how many undos are
remaining. The message could look like:
:ILLUST.
16 items left on undo stack
:eILLUST.
This lets you know how many undos it would take to restore the
edit buffer to its original condition. Once there are no more undos,
you will see the message:
:ILLUST.
undo stack is empty
:eILLUST.
Once you undo all changes,
then the file changes state from modified to unmodified. However,
if some undo changes have had to be discarded because of low memory,
the file will still be in a modified state.
:P.
The keystrokes for doing undo and redo are:
:KEYLIST.
:KEY.u u
Undo last change.
:KEY.U U
Redo last undo.
:eKEYLIST.
:SEECMD.undo
:eCMSECT.
:CMSECT id='marks'.Marks
:INCLUDE file='markinfo'.
:P.
Mark commands are:
:KEYLIST.
:KEY.m m<?>
Allows the setting of mark
:ITALICS.<?>
:PERIOD.
:BLANKLINE.
If
:ITALICS.<?>
is an exclamation mark ('!')
instead of a letter, it clears all marks on the current line.
:BLANKLINE.
If
:ITALICS.<?>
is a dot ('.')
instead of a letter, it puts &edname in
:KEYWORD.memorize mode
:PERIOD.
All characters typed are memorized until another dot ('.')
is pressed. The memorized keystrokes may be repeated by pressing
a dot ('.').
See the dot ('.') &cmdmode command later in this chapter.
:BLANKLINE
If
:ITALICS.<?>
is an equals sign ('=')
instead of a letter, it puts &edname in alternate
:KEYWORD.memorize mode
:PERIOD.
All characters typed are memorized until another equals sign ('=')
is pressed. The memorized keystrokes may be repeated by pressing
an equals sign ('=').
See the equals sign ('=') &cmdmode command later in this chapter.
:SEECMD.mark
:EXAMPLE.ma
Sets the mark a at the current cursor position
:EXAMPLE.m.
Enter memorize mode
:EXAMPLE.m!
Clear any marks set on the current line.
:KEY."'" "'<?>" (front quote)
Move to the start of the line with the mark
:ITALICS.<?>
:PERIOD.
:EXAMPLE.'a
Moves to the first column of the line with mark
:ITALICS.a
:PERIOD.
:EXAMPLE.''
Moves to the first column of line of the last position before the last
non-linear movement command was issued.
:KEY.'`' '`<?>' (back quote)
Move to the position in the edit buffer with the mark
:ITALICS.<?>
:PERIOD.
:EXAMPLE.`a
Moves to the column and line with mark
:ITALICS.a
:PERIOD.
:EXAMPLE.``
Moves to the last position before the last
non-linear movement command was issued.
:eKEYLIST.
:P.
Pressing
:ITALICS.``
and
:ITALICS.''
take you to the last position you were at before you used a
non-linear movement command (',`,?,/,G, n, and N commands).
So, if you are at line 5 column 10 and type
:ITALICS./foo
:CONT.,
pressing
:ITALICS.``
will first move
you back to line 5 column 10. Pressing
:ITALICS.``
again will move you to the occurrence of
foo, since the previous `` command was a non-linear movement command.
:eCMSECT.
:CMSECT id='cpybuff'.Copy Buffers
A ©buffer is a buffer where copied or deleted data is kept.
There are a number of these buffers available. There are 9 default
buffers that text is placed into when it is deleted/yanked (see
the &cmdline commands
:KEYWORD.delete
and
:KEYWORD.yank
:CONT.,
along with the sections
:HDREF refid='deltext'
and
:HDREF refid='cpytext'
later in this chapter).
These buffers are numbered 1 through 9, and any of these buffers may
be the active ©buffer
:PERIOD.
:P.
The active ©buffer may be selected using function keys.
CTRL_F1 through CTRL_F9 select buffers 1 through 9 respectively.
When a buffer is selected,
information about its contents is displayed in the message window.
This buffer becomes the active ©buffer
:PERIOD.
All yanked/deleted text is copied into this buffer.
:P.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?