📄 modes.gml
字号:
.endkey
.begkey 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
.param <.n>.
is specified, then that many lines are exposed.
.endkey
.begkey B <.n>.B
Moves the cursor backwards to the start of previous space delimited word
on the current line.
.np
.xmplsect begin
.begxmpl B
If the cursor was on the right parenthesis (')') of
.millust begin
x = foo(abc) + 3;
.millust end
then the cursor moves to the
.param f
in
.param foo
:period.
.endxmpl
.begxmpl 2B
If the cursor was on the right parenthesis (')') of
.millust begin
x = foo(abc) + 3;
.millust end
then the cursor moves to the
.param =
sign.
.endxmpl
.xmplsect end
.endkey
.begkey b <.n>.b
Moves the cursor backwards to the start of the previous word on the
current line.
:INCLUDE file='worddef'.
.np
.xmplsect begin
.begxmpl b
If the cursor was on the right parenthesis (')') of
.millust begin
x = foo(abc) + 3;
.millust end
then the cursor moves to the letter
.param a
in
.param abc
:period.
.endxmpl
.begxmpl 2b
If the cursor was on the right parenthesis (')') of
.millust begin
x = foo(abc) + 3;
.millust end
then the cursor moves to left parenthesis
.param (
:period.
.endxmpl
.xmplsect end
.endkey
.begkey E <.n>.E
Moves the cursor to the end of the next space delimited word on the
current line.
.np
.xmplsect begin
.begxmpl E
If the cursor was on the letter
.param f
in
.millust begin
x = foo(abc) + 3;
.millust end
then the cursor moves to the right parenthesis
.param )
:period.
.endxmpl
.begxmpl 2E
If the cursor was on the letter
.param f
in
.millust begin
x = foo(abc) + 3;
.millust end
then the cursor moves to the
.param +
sign.
.endxmpl
.xmplsect end
.endkey
.begkey e <.n>.e
Moves the cursor to the end of the next word on the current line.
:INCLUDE file='worddef'.
.np
.xmplsect begin
.begxmpl e
If the cursor was on the letter
.param f
in
.millust begin
x = foo(abc) + 3;
.millust end
then the cursor moves to the second letter
.param o
in
.param foo
:period.
.endxmpl
.begxmpl 2e
If the cursor was on the letter
.param f
in
.millust begin
x = foo(abc) + 3;
.millust end
then the cursor moves to the left parenthesis
.param (
:period.
.endxmpl
.xmplsect end
.endkey
.begkey F <.n>.F<.?>.
Moves the cursor backwards from its current position to the character
.param <.?>.
on the current line. If a repeat count
.param <.n>.
is specified, then the nth occurrence of the character
.param <.?>.
is moved to.
.np
.xmplsect begin
.begxmpl F+
If the cursor is on the semi-colon (';') in
.millust begin
x = foo(abc) + 3;
.millust end
The the cursor is moved to the
.param +
sign.
.endxmpl
.begxmpl 2Fo
If the cursor is on the semi-colon (';') in
.millust begin
x = foo(abc) + 3;
.millust end
The the cursor is moved to the first
.param o
in
.param foo
:period.
.endxmpl
.xmplsect end
.endkey
.begkey f <.n>.f<.?>.
Moves the cursor forwards from its current position to the character
.param <.?>.
on the current line. If a repeat count
.param <.n>.
is specified, then the
.param nth
occurrence of the character
.param <.?>.
is moved to.
.np
.xmplsect begin
.begxmpl f+
If the cursor is on the character
.param x
in
.millust begin
x = foo(abc) + 3;
.millust end
The the cursor is moved to the
.param +
sign.
.endxmpl
.begxmpl 2fo
If the cursor is on the character
.param x
in
.millust begin
x = foo(abc) + 3;
.millust end
The the cursor is moved to the second
.param o
in
.param foo
:period.
.endxmpl
.xmplsect end
.endkey
.begkey G <.n>.G
Goes to the line specified by the repeat count
.param <.n>.
:period.
If no repeat count is specified, you move the the last line in the
current edit buffer.
.np
.xmplsect begin
.begxmpl 100G
Moves to line 100 in the current edit buffer.
.endxmpl
.begxmpl G
Moves to the last line in the current edit buffer.
.endxmpl
.xmplsect end
.endkey
.begkey h <.n>.h
Move the cursor left one character. If
.param <.n>.
is specified, the cursor moves left
.param <.n>.
characters.
.endkey
.begkey 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.
.np
.xmplsect begin
.begxmpl 2H
Moves to the second line from the top of the current file window.
.endxmpl
.begxmpl H
Moves to the line at the top of the current file window.
.endxmpl
.xmplsect end
.endkey
.begkey j <.n>.j
Move the cursor down one line.
.param <.n>.
is specified, the cursor moves down
.param <.n>.
lines.
.endkey
.begkey k <.n>.k
Move the cursor up one line.
.param <.n>.
is specified, the cursor moves up
.param <.n>.
lines.
.endkey
.begkey 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.
.np
.xmplsect begin
.begxmpl 2L
Moves to the second line from the bottom of the current file window.
.endxmpl
.begxmpl L
Moves to the line at the bottom of the current file window.
.endxmpl
.xmplsect end
.endkey
.begkey l <.n>.l
Move the cursor right one character. If
.param <.n>.
is specified, the cursor moves right
.param <.n>.
characters.
.endkey
.begkey M M
Moves the cursor to the line in the middle of the current file window.
.endkey
.begkey T <.n>.T<.?>.
Moves the cursor backwards from its current position to the character
after the character
.param <.?>.
on the current line. If a repeat count
.param <.n>.
is specified, then the the character after the nth
occurrence of the character
.param <.?>.
is moved to.
.np
.xmplsect begin
.begxmpl T+
If the cursor is on the semi-colon (';') in
.millust begin
x = foo(abc) + 3;
.millust end
The the cursor is moved to the space after the
.param +
sign.
.endxmpl
.begxmpl 2To
If the cursor is on the semi-colon (';') in
.millust begin
x = foo(abc) + 3;
.millust end
The the cursor is moved to the second
.param o
in
.param foo
:period.
.endxmpl
.xmplsect end
.endkey
.begkey t <.n>.t<.?>.
Moves the cursor forwards from its current position to the character before
the character
.param <.?>.
on the current line. If a repeat count
.param <.n>.
is specified, then the the character before the nth
occurrence of the character
.param <.?>.
is moved to.
.np
.xmplsect begin
.begxmpl t+
If the cursor is on the character
.param x
in
.millust begin
x = foo(abc) + 3;
.millust end
The the cursor is moved to the space before
.param +
sign.
.endxmpl
.begxmpl 2to
If the cursor is on the character
.param x
in
.millust begin
x = foo(abc) + 3;
.millust end
The the cursor is moved to the first
.param o
in
.param foo
:period.
.endxmpl
.xmplsect end
.endkey
.begkey W <.n>.W
Moves the cursor forward to the start of the next space delimited word
on the current line.
.np
.xmplsect begin
.begxmpl W
If the cursor was on the letter
.param f
in
.millust begin
x = foo(abc) + 3;
.millust end
then the cursor moves to the
.param +
sign.
.endxmpl
.begxmpl 2W
If the cursor was on the letter
.param f
in
.millust begin
x = foo(abc) + 3;
.millust end
then the cursor moves to the number
.param 3
:period.
.endxmpl
.xmplsect end
.endkey
.begkey w <.n>.w
Moves the cursor forward to the start of the next word on the current
line.
:INCLUDE file='worddef'.
.np
.xmplsect begin
.begxmpl w
If the cursor was on the letter
.param f
in
.millust begin
x = foo(abc) + 3;
.millust end
then the cursor moves to the left parenthesis
.param (
:period.
.endxmpl
.begxmpl 2w
If the cursor was on the letter
.param f
in
.millust begin
x = foo(abc) + 3;
.millust end
then the cursor moves to the letter
.param a
in
.param abc
:period.
.endxmpl
.xmplsect end
.endkey
.*
.keylist end
.* ******************************************************************
.section *refid=cmundo 'Undoing Changes'
.* ******************************************************************
.np
&edvi 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.
.np
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.
.np
As you issue undo commands, a message indicating how many undos are
remaining. The message could look like:
.millust begin
16 items left on undo stack
.millust end
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:
.millust begin
undo stack is empty
.millust end
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.
.np
The keystrokes for doing undo and redo are:
.*
.keylist begin 'Undoing Changes'
.*
.begkey u u
Undo last change.
.endkey
.begkey U U
Redo last undo.
.endkey
.*
.keylist end
.*
.np
.seecmd 'undo (command)'
.* ******************************************************************
.section *refid=marks 'Marks'
.* ******************************************************************
.np
:INCLUDE file='markinfo'.
.np
Mark commands are:
.*
.keylist begin Marks
.*
.begkey m m<.?>.
Allows the setting of mark
.param <.?>.
:period.
.np
If
.param <.?>.
is an exclamation mark ('!')
instead of a letter, it clears all marks on the current line.
.np
If
.param <.?>.
is a dot ('.')
instead of a letter, it puts &edvi 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.
.np
If
.param <.?>.
is an equals sign ('=')
instead of a letter, it puts &edvi 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
.np
.xmplsect begin
.begxmpl ma
Sets the mark a at the current cursor position
.endxmpl
.begxmpl m.
Enter memorize mode
.endxmpl
.begxmpl m!
Clear any marks set on the current line.
.endxmpl
.xmplsect end
.endkey
.begkey "'" "'<.?>." (front quote)
Move to the start of the line with the mark
.param <.?>.
:period.
.np
.xmplsect begin
.begxmpl 'a
Moves to the first column of the line with mark
.param a
:period.
.endxmpl
.begxmpl ''
Moves to the first column of line of the last position before the last
non-linear movement command was issued.
.endxmpl
.xmplsect end
.endkey
.begkey '`' '`<.?>.' (back quote)
Move to the position in the edit buffer with the mark
.param <.?>.
:period.
.np
.xmplsect begin
.begxmpl `a
Moves to the column and line with mark
.param a
:period.
.endxmpl
.begxmpl ``
Moves to the last position before the last
non-linear movement command was issued.
.endxmpl
.xmplsect end
.endkey
.*
.keylist end
.*
.np
Pressing
.param ``
and
.param ''
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
.param /foo
:cont.,
pressing
.param ``
will first move
you back to line 5 column 10. Pressing
.param ``
again will move you to the occurrence of
foo, since the previous `` command was a non-linear movement command.
.* ******************************************************************
.section *refid=cpybuff 'Copy Buffers'
.* ******************************************************************
.np
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
.keyref delete
and
.keyref 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.
.np
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.
.np
When text is yanked/deleted into the active ©buffer,
the contents of the the buffers are cascaded forward from the active
buffer into the next one, with the last numbered ©buffer
losing its contents. Any buffers that are before the active
©buffer have their contents preserved. For example, if buffer 3
is the active buffer, then a deletion will cascade buffer 3 to buffer 4,
buffer 4 to buffer 5, and so on, with the contents of buffer 9 being lost.
Buffers 1 and 2 remain untouched, and buffer 3 gets a copy of the deleted text.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -