⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 modes.gml

📁 开放源码的编译器open watcom 1.6.0版的源代码
💻 GML
📖 第 1 页 / 共 4 页
字号:
.np
There are several &cmdmode commands that add text to buffers; they
are
.*
:DL break.
.*
:DT.&lt."?&gt.&lt.n&gt.d&lt.oper&gt.
:DD.Deletes text in various ways.

:DT.&lt.n&gt.DEL
:DD.Deletes the character at the current cursor position.

:DT.D
:DD.Deletes text from the current cursor position to the end of the current line.

:DT.&lt.n&gt.x
:DD.Deletes the character at the current cursor position.

:DT.&lt.n&gt.X
:DD.Deletes the character before the current cursor position.

:DT.&lt."?&gt.&lt.n&gt.y&lt.oper&gt.
:DD.Yanks (copies) text in various ways.

:DT.&lt.n&gt.Y
:DD.Yanks (copies) the current line.
.*
:eDL.
.*
There is more information on these &cmdmode
commands later in this chapter.
.np
Text may be yanked/deleted into a specific &copybuffer
by typing "[1-9] before
the appropriate command. As well, there are 26 named buffers that may
be used, 'a'-'z'.  When text is yanked or deleted into a named buffer,
it remains there for the life of the editing session (or until replaced).
.np
To retrieve the contents of a buffer, use:
.*
.keylist begin 'Copy Buffers'
.*
.begkey SHIFT_INS &lt."?&gt.SHIFT_INS
Puts (pastes) the contents of the active &copybuffer
after the cursor position in the current edit buffer. 
.seecmd put
.np
.xmplsect begin
.begxmpl "aSHIFT_INS
Copy the data in the named buffer
.param a
after the current position in the file.
.endxmpl
.begxmpl SHIFT_INS
Copy the data in the active buffer
after the current position in the file.
.endxmpl
.xmplsect end
.endkey

.begkey p &lt."?&gt.p
Puts (pastes) the contents of the active &copybuffer
after the cursor position in the current edit buffer.
.seecmd put
.np
.xmplsect begin
.begxmpl p
Copies the data in the active buffer after the current position in the file.
.endxmpl
.begxmpl "5p
Copies the data in the numbered buffer
.param 5
after the current position in the file.
.endxmpl
.xmplsect end
.endkey

.begkey P &lt."?&gt.P
Puts (pastes) the contents of the active &copybuffer
before the cursor position in the current edit buffer.
.seecmd put
.np
.xmplsect begin
.begxmpl "aP
Copy the data in the named buffer
.param a
before the current position in the file.
.endxmpl
.begxmpl P
Copy the data in the active buffer
before the current position in the file.
.endxmpl
.xmplsect end
.endkey
.*
.keylist end
.*
.np
Without a
.param "?
prefix, these commands retrieve the contents of the active buffer.
.np
The contents of a &copybuffer
may be executed, as if the contents were typed from the
keyboard. See the
.keyword @
&cmdmode command later in this chapter.
.* ******************************************************************
.section *refid=srching 'Searching'
.* ******************************************************************
.np
The following &cmdmode commands are used for searching for text:
.*
.keylist begin Searching
.*
.begkey '/' '/' (forward slash)
Enter a regular expression to search for from current position forwards.
.endkey

.begkey ? ? (question mark)
Enter a regular expression to search for from current position backwards.
.endkey

.begkey n n
Repeat last search command, in the direction of the last search.
.endkey

.begkey N N
Repeat last search command, in the opposite direction of the last search.
.endkey
.*
.keylist end
.*
.np
For more information on regular expressions, see
:HDREF refid='rxchap'.
:period.
.np
Once you press the
.keyword /
or the
.keyword ?
keys, a search string entry window will appear:
.figure *depth='2.47' *scale='59' *file='vi022' Search String Entry Window
This position and size of the search string entry window are controlled
using
the
.keyref commandwindow
windowing command.
Search strings may be up to 512 bytes in length; the search string window
scrolls.
.np
The search string window has a history associated with it; the size
of this search string history is controlled using the
.keyref maxfindhistory
setting.  As well, the search string history is preserved across sessions of
&edvi if the
.keyref historyfile
parameter is set.
.np
If the first letter of a search string is a CTRL_A (entered by typing
a CTRL_V followed by a CTRL_A)
then that search string will not be added to the search string history.
.*
.beglevel
.* ******************************************************************
.section 'Special Keys In The Search String Window'
.* ******************************************************************
.np
Once in the search string window, a number of keys have special meaning:
.se searching=1
:INCLUDE file='speckeys'.
.*
.endlevel
.* ******************************************************************
.section 'Inserting Text'
.* ******************************************************************
.np
The following commands cause &edvi to go from &cmdmode
directly into &tinsmode:
.*
.keylist begin 'Inserting Text'
.*
.begkey INS INS
Starts inserting text before the current character in the edit buffer.
.endkey

.begkey a a
Starts appending (inserting) text after the current character in
the edit buffer.
.endkey

.begkey A A
Starts appending (inserting) text after the last character on the
current line in the edit buffer.
.endkey

:INCLUDE file='gkey'.

.begkey i i
Starts inserting text before the current character in the edit buffer.
.endkey

.begkey I I
Starts inserting text before the first non-white space character in the
edit buffer.
.endkey

.begkey o o
Opens a line after the current line, and enters &tinsmode
:period.
.endkey

.begkey O O
Opens a line before the current line, and enters &tinsmode
:period.
.endkey
.*
.keylist end
.*
Once you are in &tinsmode, you can toggle back and forth between
insert and overstrike using the
.keyword INS
key.  You exit &tinsmode by pressing the
.keyword ESC
key. See the previous section,
:HDREF refid='timode'.
:cont.,
for more information on manipulating text in &tinsmode
:period.
.* ******************************************************************
.section 'Replacing Text'
.* ******************************************************************
.np
The following commands are used to replace text:
.*
.keylist begin 'Replacing Text'
.*
:INCLUDE file='gkey'.

.begkey R R
Starts overstriking text at the current character in the edit buffer.
Once you are overstriking text, you can toggle back and forth between
overstrike and insert using the
.keyword INS
key.   You exit &tinsmode by pressing the
.keyword ESC
key. See the previous section,
:HDREF refid='timode'.
:cont.,
for more information on manipulating text in &tinsmode
:period.
.endkey

.begkey r &lt.n&gt.r&lt.?&gt.
Replaces the current character with the next character typed,
.param &lt.?&gt.
:period.
If a repeat count is specified, then the next
.param &lt.n&gt.
characters are replaced with the character
.param &lt.?&gt.
:period.
.np
.xmplsect begin
.begxmpl ra
Replaces the current character with the letter
.param a
:period.
.endxmpl
.begxmpl 10rZ
Replaces the next 10 characters with the letter
.param Z
:period.
.endxmpl
.xmplsect end
.endkey
.*
.keylist end
.* ******************************************************************
.section *refid=deltext 'Deleting Text'
.* ******************************************************************
.np
The commands in this section are for deleting text in
an edit buffer.  All deleted text is copied into a &copybuffer
for later use, see the section
:HDREF refid='cpybuff'.
:period.
.*
.keylist begin 'Deleting Text'
.*
.begkey D &lt."?&gt.D
Deletes the characters from the current position to the end of line.
.np
.xmplsect begin
.begxmpl "aD
Deletes characters from current position to the end of line into the named
buffer
.param a
:period.
.endxmpl
.xmplsect end
.endkey

.begkey X &lt.n&gt.&lt."?&gt.X
Delete the character before the current cursor position.
.np
.xmplsect begin
.begxmpl X
Delete the previous character.
.endxmpl
.begxmpl 10X
Delete the 10 previous characters.
.endxmpl
.begxmpl "z5X
Delete the 5 previous characters into the named buffer
.param z
:period.
.endxmpl
.xmplsect end
.endkey

.begkey x &lt.n&gt.&lt."?&gt.x
Delete the character at the current cursor position.
.np
.xmplsect begin
.begxmpl x
Delete the current character.
.endxmpl
.begxmpl 3x
Delete the next 3 characters.
.endxmpl
.begxmpl "217x
Delete the next 17 characters into the numbered buffer
.param 2
:period.
.endxmpl
.xmplsect end
.endkey

.begkey DEL &lt.n&gt.&lt."?&gt.DEL
Delete the character at the current cursor position. This behaves
the same as the &cmdmode command
.keyword x
:period.
.np
.xmplsect begin
.begxmpl DEL
Delete the current character.
.endxmpl
.begxmpl 12DEL
Delete the next 12 characters.
.endxmpl
.begxmpl "a5DEL
Delete the next 5 characters into the named buffer
.param a
:period.
.endxmpl
.xmplsect end
.endkey
.*
.keylist end
.*
.np
.se plural=0
:INCLUDE file='oper'.
.*
.keylist begin 'Deleting Text'
.*
.begkey d &lt.n&gt.&lt."?&gt.d&lt.oper&gt.
Delete text from the current position in the file to the
position specified by
.param &lt.oper&gt.
:period.
A copy of the text is placed into the specified &copybuffer
.param &lt."?&gt.
:period.
If no buffer is specified, then the text is placed into the active
buffer.
A repeat count
.param &lt.n&gt.
may precede the command, this causes
.param &lt.n&gt.
units of the
.param &lt.oper&gt.
command to be deleted.
.np
.param &lt.oper&gt.
may be specified as
.param d
:cont.,
which causes a single line to be deleted.
.seecmd delete
.np
.xmplsect begin
.begxmpl dr
Deletes the current selected (highlighted) region in the edit buffer.
A copy is placed into the active &copybuffer
:period.
.endxmpl
.begxmpl "zdd
Deletes the current line. A copy is placed into the named &copybuffer
.param z
:period.
.endxmpl
.begxmpl 95dd
Deletes 95 lines, starting at the current. A copy of the lines
is placed into the active buffer.
.endxmpl
.begxmpl "cdfa
Deletes the characters from the current column up to and including
the first
.param a
on the current line.  A copy of the text is placed
in the named buffer
.param c
:period.
.endxmpl
.begxmpl "5d'a
Deletes the lines from the current line to the line with mark
.param m
into the numbered buffer
.param 5
:period.
.endxmpl
.begxmpl dG
Deletes all lines from the current line to the end of the current edit
buffer.
.endxmpl
.xmplsect end
.endkey
.*
.keylist end
.* ******************************************************************
.section *refid=cpytext 'Copying Text'
.* ******************************************************************
.np
This section describes commands that are for yanking (copying) text.
This text is placed into a &copybuffer, see the section
:HDREF refid='cpybuff'.
for more information.
.*
.keylist begin 'Copying Text'
.*
.begkey Y &lt.n&gt.Y
Yank (copy) the current line.  If a repeat count
.param &lt.n&gt.
is specified, then
.param &lt.n&gt.
lines are copied.
.np
This command is the same as typing
.param yy
:period.
.endkey
.*
.keylist end
.*
.se plural=0
.np
:INCLUDE file='oper'.
.*
.keylist begin 'Copying Text'
.*
.begkey y '&lt.n&gt.&lt."?&gt.y&lt.oper&gt.'
Yanks (copies) text from the current position in the file to the
position specified by
.param &lt.oper&gt.
:period.
Text is placed into the specified &copybuffer
.param &lt."?&gt.
:period.
If no buffer is specified, then the text is placed into the active
buffer.
A repeat count
.param &lt.n&gt.
may precede the command, this causes
.param &lt.n&gt.
units of the
.param &lt.oper&gt.
command to be copied.
.np
.param &lt.oper&gt.
may be specified as
.param y
:cont.,
which causes a single line to be yanked.
.seecmd delete
.np
.xmplsect begin
.begxmpl yy
Yanks (copies) the current line into the active &copybuffer
:period.
.endxmpl
.begxmpl 10yy
Copies 10 lines, starting at the current, into the active buffer.
.endxmpl
.begxmpl y$
Copies the characters from the current column to the end of the
current line into
the active buffer.
.endxmpl
.begxmpl "ay'm
Yanks the lines from the current line to the line with mark
.param m
into the named buffer
.param a
:period.
.endxmpl
.begxmpl y/foo
Copies:
:UL.
:LI.the part of the current line from the current position to the
end of the line
:LI.all lines between the current line and the first line
containing the string
.param foo
:LI the part of the line containing
.param foo
from the start of the line to the first letter in the string
.param foo
:eUL.
.endxmpl
.xmplsect end
.endkey
.*
.keylist end
.* ******************************************************************
.section *refid=cmchg 'Changing Text'
.* ******************************************************************
.np
The following commands are for changing text.
If a range of lines is being changed, the lines are deleted and &edvi
enters &tinsmode
:period.
.np
If the change is taking place on the single line, the range of
characters being changed is highlighted, and the last character in the
range is indicated with a dollar sign ('$').
If the
.keyword ESC
key is pressed, and
.keyref changelikevi 1
is not set, then the change command is cancelled. If
.keyref changelikevi 1
is set, then the highlighted area is deleted.  If anything other than the
.keyword ESC
key is pressed, the highlighted area is deleted and &edvi enters &tinsmode
:period.
.*
.keylist begin 'Changing Text'
.*
.begkey C C
This command changes the characters on the current line from the current
character to the end of the line.  The character range is highlighted, and
once a character is typed, the highlighted text is
deleted, and &tinsmode
is entered.
.np
This command is the same as typing
.param c$
:period.
.endkey

.begkey S &lt.n&gt.S
This command substitutes the current line with text.  The text on the current
line is deleted, and &tinsmode is entered.  If a repeat count
.param &lt.n&gt.
is specified, then
.param &lt.n&gt.
lines are deleted.
.np
This command is the same as typing
.keyword cc
:period.
.endkey

.begkey s &lt.n&gt.s
This command substitutes the current character with text.  If
.param &lt.n&gt.
is specified, then
.param &lt.n&gt.
characters are substituted.
.np
This command is the same as typing
.param cl
:cont.,
.param cRIGHT
:cont.,
or
.param cSPACE
:period.
.endkey
.*
.keylist end
.*
.np
.se plural = 0
:INCLUDE file='oper'
.*
.keylist begin 'Changing Text'
.*
.begkey c &lt.n&gt.c&lt.oper&gt.
Change text from the current position in the file to the
position specified by
.param &lt.oper&gt.
:period.
A repeat count
.param &lt.n&gt.
may precede the command, this causes
.param &lt.n&gt.
units of the
.param &lt.oper&gt.
command to be changed.
.np
.param &lt.oper&gt.
may be specified as
.keyword c
:cont.,
which causes a single line to be changed.

⌨️ 快捷键说明

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