annotate man/viper-cmd.texi @ 28:1917ad0d78d7 r19-15b97

Import from CVS: tag r19-15b97
author cvs
date Mon, 13 Aug 2007 08:51:55 +0200
parents bcdc7deadc19
children 131b0175ea99
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 @node Commands,,Customization,Top,Top
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2 @chapter Commands
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4 This section is a semi-automatically bowdlerized version of the Vi
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 reference created by @* @samp{maart@@cs.vu.nl} and others. It can be
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6 found on the Vi archives. Very little has been changed for Viper.@refill
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 @menu
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 * Groundwork:: Textual Conventions and Viper basics
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 * Text Handling:: Moving, Editing, Undoing.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 * Display:: Scrolling.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 * File and Buffer Handling:: Editing, Writing and Quitting.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 * Mapping:: Mapping Keys, Keyboard Macros
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 * Shell Commands:: Accessing Shell Commands, Processing Text
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 * Options:: Ex options, the @kbd{:set} commands
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 * Emacs Related Commands:: Meta Keys, Windows
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 * Mouse-bound Commands:: Search and insertion of text
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 @end menu
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 @node Groundwork, Text Handling, Commands, Commands
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21 @comment node-name, next, previous, up
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 @section Groundwork
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 The VI command set is based on the idea of combining motion commands
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 with other commands. The motion command is used as a text region
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 specifier for other commands.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 We classify motion commands into @dfn{point commands} and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 @dfn{line commands}.@refill
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 @cindex point commands
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 The point commands are:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 @quotation
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 @kbd{h}, @kbd{l}, @kbd{0}, @kbd{$}, @kbd{w}, @kbd{W}, @kbd{b}, @kbd{B},
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 @kbd{e}, @kbd{E}, @kbd{(}, @kbd{)}, @kbd{/}, @kbd{?}, @kbd{`}, @kbd{f},
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 @kbd{F}, @kbd{t}, @kbd{T}, @kbd{%}, @kbd{;}, @kbd{,}, @kbd{^}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 @end quotation
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 @cindex line commands
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 The line commands are:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 @quotation
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 @kbd{j}, @kbd{k}, @kbd{+}, @kbd{-}, @kbd{H}, @kbd{M}, @kbd{L}, @kbd{@{},
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 @kbd{@}}, @kbd{G}, @kbd{'}, @kbd{[[}, @kbd{]]}, @kbd{[]}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 @end quotation
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 @noindent
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 Text Deletion Commands (@xref{Deleting Text}), Change commands
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 (@xref{Changing Text}), even Shell Commands (@xref{Shell Commands})
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 use these commands to describe a region of text to operate on.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 @cindex r and R region specifiers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 Viper adds two region descriptors, @kbd{r} and @kbd{R}. These describe
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57 the Emacs regions (@xref{Basics}), but they are not movement commands.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 The command description uses angle brackets @samp{<>} to indicate
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 metasyntactic variables, since the normal conventions of using simple
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61 text can be confusing with Viper where the commands themselves are
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62 characters. Watch out where @kbd{<} shift commands and @kbd{<count>} are
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 mentioned together!!!
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 @kindex <move>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66 @kindex <a-z>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67 @kindex <address>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 @cindex <move>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69 @cindex <a-z>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 @cindex <address>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 @cindex movements
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 @samp{<move>} refers to the above movement commands, and @samp{<a-z>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 refers to registers or textmarkers from @samp{a} to @samp{z}. Note
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75 that the @samp{<move>} is described by full move commands, that is to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76 say they will take counts, and otherwise behave like normal move commands.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 @cindex Ex addresses
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78 @samp{<address>} refers to Ex line addresses, which include
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80 @table @kbd
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 @item . <No address>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82 Current line
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83 @item .+n .-n
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84 Add or subtract for current line
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85 @item number
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86 Actual line number, use @kbd{.=} to get the line number
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87 @item '<a-z>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88 Textmarker
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89 @item $
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90 Last line
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91 @item x,y
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92 Where x and y are one of the above
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93 @item %
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94 @cindex % (Ex address)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95 For the whole file, same as (1,$).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96 @item /pat/
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97 @item ?pat?
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98 Next or previous line with pattern pat
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99 @end table
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101 @cindex % (Current file)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102 Note that @samp{%} is used in Ex commands to mean current file. If you
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103 want a @samp{%} in your command, it must be escaped as @samp{\%}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104 @cindex # (Previous file)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105 Similarly, @samp{#} expands to the previous file. The previous file is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106 the first file in @kbd{:args} listing. This defaults to previous window
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107 in the VI sense if you have one window only.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109 @kindex <args>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110 @kindex <cmd>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111 @cindex <args>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112 @cindex <cmd>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
113 @noindent
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114 Others like @samp{<args> -- arguments}, @samp{<cmd> -- command} etc.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115 should be fairly obvious.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117 @noindent
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118 Common characters referred to include:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120 @table @kbd
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121 @item <sp>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122 Space
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123 @item <ht>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124 Tab
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125 @item <lf>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
126 Linefeed
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
127 @item <esc>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128 Escape
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129 @item <cr>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
130 Return, Enter
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
131 @end table
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132 @cindex <cr>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133 @cindex <esc>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134 @cindex <lf>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
135 @cindex <ht>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
136 @cindex <sp>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
137
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
138 @cindex words
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
139 @cindex WORDS
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
140 @cindex char
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
141 @cindex CHAR
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
142
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
143 We also use @samp{word} for alphanumeric/non-alphanumeric words, and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
144 @samp{WORD} for whitespace delimited words. @samp{char} refers to any
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
145 ASCII character, @samp{CHAR} to non-whitespace character.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
146 Brackets @samp{[]} indicate optional parameters; @samp{<count>} also
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
147 optional, usually defaulting to 1. Brackets are elided for
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
148 @samp{<count>} to eschew obfuscation.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
149
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
150 Viper's idea of Vi's words is slightly different from Vi. First, Viper
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
151 words understand Emacs symbol tables. Therefore, all symbols declared to be
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
152 alphanumeric in a symbol table can automatically be made part of the Viper
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
153 word. This is useful when, for instance, editing text containing European,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
154 Cyrillic, etc., letters.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
155
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
156 Second, Viper lets you depart from Vi's idea of a word by changing the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
157 value of @code{vip-syntax-preference}. By default, this variable is set to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
158 @code{'strict-vi}, which means that alphanumeric symbols are exactly as
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
159 in Vi.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
160 However, if the value is @code{'reformed-vi} then alphanumeric
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
161 symbols will be those specified by the current Emacs syntax table (which
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
162 may be different for different major modes) plus the underscore symbol
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
163 @code{_}. The user can also specify the value @code{'emacs}, which would
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
164 make Viper use exactly the Emacs notion of word. In particular, the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
165 underscore may not be part of a word. Finally, if
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
166 @code{vip-syntax-preference} is set to @code{'extended}, Viper words would
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
167 consist of characters that are classified as alphanumeric @emph{or} as
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
168 parts of symbols. This is convenient for writing programs and in many other
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
169 situations.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
170
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
171 @vindex @code{vip-syntax-preference}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
172 @cindex syntax table
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
173
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
174 @code{vip-syntax-preference} is a local variable, so it can have different
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
175 values for different major modes. For instance, in programming modes it can
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
176 have the value @code{'extended}. In text modes where words contain special
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
177 characters, such as European (non-English) letters, Cyrillic letters, etc.,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
178 the value can be @code{'reformed-vi} or @code{'emacs}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
179
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
180 Changes to @code{vip-syntax-preference} should be done in the hooks to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
181 various major modes. Furthermore, for these changes to take effect, you
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
182 should execute @code{(vip-update-alphanumeric-class)} right after changing
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
183 the value of @code{vip-syntax-preference}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
184
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
185 The above discussion concerns only the movement commands. In regular
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
186 expressions, words remain the same as in Emacs. That is, the expressions
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
187 @code{\w}, @code{\>}, @code{\<}, etc., use Emacs' idea of what is a word,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
188 and they don't look into the value of variable
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
189 @code{vip-syntax-preference}. This is because Viper doesn't change syntax
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
190 tables in order to not thwart the various major modes that set these
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
191 tables.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
192
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
193 The usual Emacs convention is used to indicate Control Characters, i.e
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
194 C-h for Control-h. @emph{Do not confuse this to mean the separate
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
195 characters C - h!!!} The @kbd{^} is itself, never used to indicate a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
196 Control character.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
197
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
198 @node Text Handling, Display, Groundwork, Commands
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
199 @section Text Handling
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
200
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
201 @menu
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
202 * Move Commands:: Moving, Searching
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
203 * Marking:: Textmarkers in Viper and the Emacs Mark.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
204 * Appending Text:: Text insertion, Shifting, Putting
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
205 * Editing in Insert State:: Autoindent, Quoting etc.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
206 * Deleting Text:: Deleting
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
207 * Changing Text:: Changing, Replacement, Joining
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
208 * Search and Replace:: Searches, Query Replace, Pattern Commands
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
209 * Yanking:: Yanking, Viewing Registers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
210 * Undoing:: Multiple Undo, Backups
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
211 @end menu
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
212
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
213 @node Move Commands,Marking,,Text Handling
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
214 @subsection Move Commands
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
215
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
216 @cindex movement commands
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
217 @cindex searching
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
218 @cindex textmarkers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
219 @cindex markers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
220 @cindex column movement
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
221 @cindex paragraphs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
222 @cindex headings
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
223 @cindex sections
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
224 @cindex sentences
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
225 @cindex matching parens
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
226 @cindex paren matching
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
227
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
228 @table @kbd
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
229 @item <count> h C-h
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
230 <count> chars to the left.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
231 @item <count> j <lf> C-n
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
232 <count> lines downward.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
233 @item <count> l <sp>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
234 <count> chars to the right.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
235 @item <count> k C-p
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
236 <count> lines upward.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
237 @item <count> $
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
238 To the end of line <count> from the cursor.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
239 @item <count> ^
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
240 To the first CHAR <count> - 1 lines lower.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
241 @item <count> -
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
242 To the first CHAR <count> lines higher.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
243 @item <count> + <cr>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
244 To the first CHAR <count> lines lower.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
245 @item 0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
246 To the first char of the line.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
247 @item <count> |
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
248 To column <count>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
249 @item <count> f<char>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
250 <count> <char>s to the right (find).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
251 @item <count> t<char>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
252 Till before <count> <char>s to the right.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
253 @item <count> F<char>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
254 <count> <char>s to the left.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
255 @item <count> T<char>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
256 Till after <count> <char>s to the left.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
257 @item <count> ;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
258 Repeat latest @kbd{f t F T} <count> times.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
259 @item <count> ,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
260 Repeat latest @kbd{f t F T}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
261 <count> times in opposite direction.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
262 @item <count> w
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
263 <count> words forward.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
264 @item <count> W
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
265 <count> WORDS forward.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
266 @item <count> b
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
267 <count> words backward.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
268 @item <count> B
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
269 <count> WORDS backward.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
270 @item <count> e
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
271 To the end of word <count> forward.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
272 @item <count> E
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
273 To the end of WORD <count> forward.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
274 @item <count> G
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
275 Go to line <count> (default end-of-file).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
276 @item <count> H
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
277 To line <count> from top of the screen (home).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
278 @item <count> L
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
279 To line <count> from bottom of the screen (last).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
280 @item M
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
281 To the middle line of the screen.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
282 @item <count> )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
283 <count> sentences forward.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
284 @item <count> (
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
285 <count> sentences backward.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
286 @item <count> @}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
287 <count> paragraphs forward.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
288 @item <count> @{
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
289 <count> paragraphs backward.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
290 @item <count> ]]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
291 To the <count>th heading.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
292 @item <count> [[
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
293 To the <count>th previous heading.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
294 @item <count> []
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
295 To the end of <count>th heading.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
296 @item m<a-z>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
297 Mark the cursor position with a letter.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
298 @item `<a-z>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
299 To the mark.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
300 @item '<a-z>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
301 To the first CHAR of the line with the mark.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
302 @item [<a-z>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
303 Show contents of textmarker.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
304 @item ]<a-z>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
305 Show contents of register.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
306 @item ``
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
307 To the cursor position before the latest absolute
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
308 jump (of which are examples @kbd{/} and @kbd{G}).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
309 @item ''
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
310 To the first CHAR of the line on which the cursor
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
311 was placed before the latest absolute jump.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
312 @item <count> /<string>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
313 To the <count>th occurrence of <string>.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
314 @item <count> /<cr>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
315 To the <count>th occurrence of <string> from previous @kbd{/ or ?}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
316 @item <count> ?<string>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
317 To the <count>th previous occurrence of <string>.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
318 @item <count> ?<cr>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
319 To the <count>th previous occurrence of <string> from previous @kbd{? or /}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
320 @item n
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
321 Repeat latest @kbd{/} @kbd{?} (next).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
322 @item N
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
323 Repeat latest search in opposite direction.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
324 @item C-c /
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
325 Without a prefix argument, this command toggles
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
326 case-sensitive/case-insensitive search modes and plain vanilla/regular
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
327 expression search. With the prefix argument 1, i.e.,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
328 @kbd{1 C-c /}, this toggles case-sensitivity; with the prefix argument 2,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
329 toggles plain vanilla search and search using
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
330 regular expressions. @xref{Viper Specials}, for alternative ways to invoke
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
331 this function.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
332 @cindex vanilla search
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
333 @cindex case-sensitive search
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
334 @cindex case-insensitive search
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
335 @item %
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
336 Find the next bracket and go to its match.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
337 @end table
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
338 @kindex @kbd{%}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
339 @kindex @kbd{C-c /}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
340 @kindex @kbd{N}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
341 @kindex @kbd{n}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
342 @kindex @kbd{?<cr>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
343 @kindex @kbd{/<cr>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
344 @kindex @kbd{?<string>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
345 @kindex @kbd{/<string>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
346 @kindex @kbd{''}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
347 @kindex @kbd{``}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
348 @kindex @kbd{]<a-z>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
349 @kindex @kbd{[<a-z>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
350 @kindex @kbd{'<a-z>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
351 @kindex @kbd{`<a-z>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
352 @kindex @kbd{m<a-z>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
353 @kindex @kbd{[]}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
354 @kindex @kbd{[[}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
355 @kindex @kbd{]]}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
356 @kindex @kbd{@{}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
357 @kindex @kbd{@}}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
358 @kindex @kbd{(}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
359 @kindex @kbd{)}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
360 @kindex @kbd{M}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
361 @kindex @kbd{L}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
362 @kindex @kbd{H}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
363 @kindex @kbd{G}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
364 @kindex @kbd{E}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
365 @kindex @kbd{e}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
366 @kindex @kbd{B}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
367 @kindex @kbd{b}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
368 @kindex @kbd{W}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
369 @kindex @kbd{w}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
370 @kindex @kbd{,}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
371 @kindex @kbd{;}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
372 @kindex @kbd{T<char>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
373 @kindex @kbd{F<char>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
374 @kindex @kbd{t<char>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
375 @kindex @kbd{f<char>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
376 @kindex @kbd{|}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
377 @kindex @kbd{0}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
378 @kindex @kbd{<cr>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
379 @kindex @kbd{+}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
380 @kindex @kbd{-}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
381 @kindex @kbd{^}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
382 @kindex @kbd{$}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
383 @kindex @kbd{C-p}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
384 @kindex @kbd{<lf>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
385 @kindex @kbd{<sp>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
386 @kindex @kbd{C-n}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
387 @kindex @kbd{C-h}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
388 @kindex @kbd{h}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
389 @kindex @kbd{j}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
390 @kindex @kbd{k}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
391 @kindex @kbd{l}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
392
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
393 @node Marking,Appending Text,Move Commands,Text Handling
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
394 @subsection Marking
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
395
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
396 Emacs mark is referred to in the region specifiers @kbd{r} and @kbd{R}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
397 @xref{Emacs Preliminaries} and @pxref{Basics} for explanation. Also
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
398 see @ref{Mark,,Mark,emacs,The GNU Emacs manual}, for an explanation of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
399 the Emacs mark ring.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
400
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
401 @cindex marking
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
402
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
403 @table @kbd
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
404 @item m<a-z>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
405 Mark the current file and position with the specified letter.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
406 @item m .
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
407 Set the Emacs mark (@xref{Emacs Preliminaries}) at point.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
408 @item m <
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
409 Set the Emacs mark at beginning of buffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
410 @item m >
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
411 Set the Emacs mark at end of buffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
412 @item m ,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
413 Jump to the Emacs mark.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
414 @item :mark <char>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
415 Mark position with text marker named <char>. This is an Ex command.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
416 @item :k <char>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
417 Same as @kbd{:mark}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
418 @item ``
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
419 Exchange point and mark.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
420 @item ''
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
421 Exchange point and mark and go to the first CHAR on line.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
422 @item '<a-z>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
423 Go to specified Viper mark.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
424 @item
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
425 Go to specified Viper mark and go to the first CHAR on line.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
426 @end table
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
427 @kindex @kbd{m<a-z>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
428 @kindex @kbd{m.}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
429 @kindex @kbd{m>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
430 @kindex @kbd{m<}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
431 @kindex @kbd{m,}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
432 @findex @kbd{:mark}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
433 @findex @kbd{:k}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
434 @kindex @kbd{''}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
435 @kindex @kbd{``}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
436 @kindex @kbd{`<a-z>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
437 @kindex @kbd{'<a-z>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
438
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
439 @node Appending Text, Editing in Insert State, Marking,Text Handling
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
440 @subsection Appending Text
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
441
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
442 @xref{Options} to see how to change tab and shiftwidth size. See the GNU
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
443 Emacs manual, or try @kbd{C-ha tabs} (If you have turned Emacs help on).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
444 Check out the variable @code{indent-tabs-mode} to put in just spaces.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
445 Also see options for word-wrap.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
446
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
447 @cindex inserting
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
448 @cindex appending
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
449 @cindex paste
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
450 @cindex put
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
451
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
452 @table @kbd
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
453 @item <count> a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
454 <count> times after the cursor.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
455 @item <count> A
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
456 <count> times at the end of line.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
457 @item <count> i
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
458 <count> times before the cursor (insert).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
459 @item <count> I
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
460 <count> times before the first CHAR of the line
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
461 @item <count> o
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
462 On a new line below the current (open).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
463 The count is only useful on a slow terminal.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
464 @item <count> O
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
465 On a new line above the current.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
466 The count is only useful on a slow terminal.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
467 @item <count> ><move>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
468 Shift the lines described by <count><move> one
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
469 shiftwidth to the right (layout!).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
470 @item <count> >>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
471 Shift <count> lines one shiftwidth to the right.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
472 @item <count> ["<a-z1-9>]p
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
473 Put the contents of the (default undo) buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
474 <count> times after the cursor. The register will
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
475 be automatically downcased.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
476 @item <count> ["<a-z1-9>]P
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
477 Put the contents of the (default undo) buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
478 <count> times before the cursor. The register will
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
479 @item [<a-z>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
480 Show contents of textmarker.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
481 @item ]<a-z>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
482 Show contents of register.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
483 @item <count> .
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
484 Repeat previous command <count> times. For destructive
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
485 commands as well as undo.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
486 @item f1 1 and f1 2
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
487 While @kbd{.} repeats the last destructive command,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
488 these two macros repeat the second-last and the third-last destructive
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
489 commands. @xref{Vi Macros}, for more information on Vi macros.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
490 @item C-c M-p and C-c M-n
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
491 In Vi state,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
492 these commands help peruse the history of Vi's destructive commands.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
493 Successive typing of @kbd{C-c M-p} causes Viper to search the history in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
494 the direction
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
495 of older commands, while hitting @kbd{C-c M-n} does so in reverse
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
496 order. Each command in the history is displayed in the Minibuffer. The
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
497 displayed command can
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
498 then be executed by typing `@kbd{.}'.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
499
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
500 Since typing the above sequences of keys may be tedious, the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
501 functions doing the perusing can be bound to unused keyboard keys in the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
502 @file{~/.vip} file. @xref{Viper Specials}, for details.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
503 @end table
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
504 @kindex @kbd{C-c M-p}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
505 @kindex @kbd{C-c M-n}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
506 @kindex @kbd{.}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
507 @kindex @kbd{]<a-z>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
508 @kindex @kbd{[<a-z>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
509 @kindex @kbd{P}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
510 @kindex @kbd{p}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
511 @kindex @kbd{"<a-z1-9>p}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
512 @kindex @kbd{"<a-z1-9>P}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
513 @kindex @kbd{>>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
514 @kindex @kbd{><move>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
515 @kindex @kbd{O}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
516 @kindex @kbd{o}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
517 @kindex @kbd{i}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
518 @kindex @kbd{A}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
519 @kindex @kbd{a}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
520
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
521 @node Editing in Insert State, Deleting Text, Appending Text,Text Handling
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
522 @subsection Editing in Insert State
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
523
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
524 Minibuffer can be edited similarly to Insert state, and you can switch
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
525 between Insert/Replace/Vi states at will.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
526 Some users prefer plain Emacs feel in the Minibuffer. To this end, set
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
527 @var{vip-vi-style-in-minibuffer} to @code{nil}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
528
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
529 @cindex Insert state
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
530
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
531 @table @kbd
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
532 @item C-v
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
533 Deprive the next char of its special meaning (quoting).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
534 @item C-h
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
535 One char back.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
536 @item C-w
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
537 One word back.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
538 @item C-u
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
539 Back to the begin of the change on the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
540 current line.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
541
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
542 @end table
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
543 @kindex @kbd{C-u}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
544 @kindex @kbd{C-w}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
545 @kindex @kbd{C-v}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
546
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
547 @node Deleting Text, Changing Text, Editing in Insert State, Text Handling
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
548 @subsection Deleting Text
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
549
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
550
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
551 There is one difference in text deletion that you should be
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
552 aware of. This difference comes from Emacs and was adopted in Viper
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
553 because we find it very useful. In Vi, if you delete a line, say, and then
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
554 another line, these two deletions are separated and are put back
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
555 separately if you use the @samp{p} command. In Emacs (and Viper), successive
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
556 series of deletions that are @emph{not interrupted} by other commands are
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
557 lumped together, so the deleted text gets accumulated and can be put back
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
558 as one chunk. If you want to break a sequence of deletions so that the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
559 newly deleted text could be put back separately from the previously deleted
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
560 text, you should perform a non-deleting action, e.g., move the cursor one
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
561 character in any direction.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
562
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
563 @cindex shifting text
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
564
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
565 @table @kbd
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
566 @item <count> x
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
567 Delete <count> chars under and after the cursor.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
568 @item <count> X
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
569 Delete <count> chars before the cursor.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
570 @item <count> d<move>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
571 Delete from point to endpoint of <count><move>.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
572 @item <count> dd
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
573 Delete <count> lines.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
574 @item D
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
575 The rest of the line.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
576 @item <count> <<move>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
577 Shift the lines described by <count><move> one
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
578 shiftwidth to the left (layout!).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
579 @item <count> <<
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
580 Shift <count> lines one shiftwidth to the left.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
581 @end table
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
582 @kindex @kbd{<<}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
583 @kindex @kbd{<<move>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
584 @kindex @kbd{D}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
585 @kindex @kbd{dd}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
586 @kindex @kbd{d<move>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
587 @kindex @kbd{X}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
588 @kindex @kbd{x}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
589
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
590 @node Changing Text, Search and Replace, Deleting Text,Text Handling
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
591 @subsection Changing Text
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
592
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
593 @cindex joining lines
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
594 @cindex changing case
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
595 @cindex quoting regions
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
596 @cindex substitution
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
597
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
598 @table @kbd
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
599 @item <count> r<char>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
600 Replace <count> chars by <char> - no <esc>.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
601 @item <count> R
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
602 Overwrite the rest of the line,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
603 appending change @var{count - 1} times.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
604 @item <count> s
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
605 Substitute <count> chars.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
606 @item <count> S
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
607 Change <count> lines.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
608 @item <count> c<move>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
609 Change from begin to endpoint of <count><move>.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
610 @item <count> cc
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
611 Change <count> lines.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
612 @item <count> C
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
613 The rest of the line and <count> - 1 next lines.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
614 @item <count> =<move>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
615 Reindent the region described by move.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
616 @item <count> ~
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
617 Switch lower and upper cases.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
618 @item <count> J
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
619 Join <count> lines (default 2).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
620 @item :[x,y]s/<p>/<r>/<f>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
621 Substitute (on lines x through y) the pattern
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
622 <p> (default the last pattern) with <r>. Useful
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
623 flags <f> are @samp{g} for @samp{global} (i.e. change every
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
624 non-overlapping occurrence of <p>) and @samp{c} for
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
625 @samp{confirm} (type @samp{y} to confirm a particular
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
626 substitution, else @samp{n} ). Instead of @kbd{/} any
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
627 punctuation CHAR unequal to <space> <tab> and <lf> can be used as
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
628 delimiter.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
629 @item :[x,y]copy [z]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
630 Copy text between @kbd{x} and @kbd{y} to the position after @kbd{z}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
631 @item :[x,y]t [z]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
632 Same as @kbd{:copy}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
633 @item :[x,y]move [z]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
634 Move text between @kbd{x} and @kbd{y} to the position after @kbd{z}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
635 @item &
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
636 Repeat latest Ex substitute command, e.g.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
637 @kbd{:s/wrong/good}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
638 @item C-c /
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
639 Toggle case-sensitive search. With prefix argument, toggle vanilla/regular
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
640 expression search.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
641 @item #c<move>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
642 Change upper case characters in the region to lower case.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
643 @item #C<move>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
644 Change lower case characters in the region to upper case.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
645 @item #q<move>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
646 Insert specified string at the beginning of each line in the region
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
647 @item C-c M-p and C-c M-n
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
648 In Insert and Replace states, these keys are bound to commands that peruse
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
649 the history of the text
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
650 previously inserted in other insert or replace commands. By repeatedly typing
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
651 @kbd{C-c M-p} or @kbd{C-c M-n}, you will cause Viper to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
652 insert these previously used strings one by one.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
653 When a new string is inserted, the previous one is deleted.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
654
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
655 In Vi state, these keys are bound to functions that peruse the history of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
656 destructive Vi commands.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
657 @xref{Viper Specials}, for details.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
658 @end table
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
659 @kindex @kbd{C-c M-p}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
660 @kindex @kbd{C-c M-n}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
661 @kindex @kbd{#q<move> }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
662 @kindex @kbd{#C<move>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
663 @kindex @kbd{#c<move>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
664 @kindex @kbd{&}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
665 @findex @kbd{:substitute/<p>/<r>/<f>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
666 @findex @kbd{:s/<p>/<r>/<f>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
667 @findex @kbd{:copy [z]}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
668 @findex @kbd{:t [z]}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
669 @findex @kbd{:move [z]}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
670 @kindex @kbd{J}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
671 @kindex @kbd{~}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
672 @kindex @kbd{=<move>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
673 @kindex @kbd{C}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
674 @kindex @kbd{cc}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
675 @kindex @kbd{c<move>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
676 @kindex @kbd{S}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
677 @kindex @kbd{s}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
678 @kindex @kbd{R}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
679 @kindex @kbd{r<char>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
680
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
681 @node Search and Replace, Yanking, Changing Text,Text Handling
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
682 @subsection Search and Replace
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
683
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
684 @xref{Groundwork}, for Ex address syntax. @xref{Options} to see how to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
685 get literal (non-regular-expression) search and how to stop search from
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
686 wrapping around.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
687
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
688 @table @kbd
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
689 @item <count> /<string>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
690 To the <count>th occurrence of <string>.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
691 @item <count> ?<string>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
692 To the <count>th previous occurrence of <string>.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
693 @item <count> g<move>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
694 Search for the text described by move. (off by default)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
695 @item n
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
696 Repeat latest @kbd{/} @kbd{?} (next).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
697 @item N
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
698 Idem in opposite direction.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
699 @item %
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
700 Find the next bracket and go to its match
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
701 @item :[x,y]g/<string>/<cmd>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
702 @cindex text processing
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
703 Search globally [from line x to y] for <string>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
704 and execute the Ex <cmd> on each occurrence.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
705 @item :[x,y]v/<string>/<cmd>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
706 Execute <cmd> on the lines that don't match.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
707 @item #g<move>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
708 Execute the last keyboard macro for each line in the region.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
709 @xref{Macros and Registers}, for more info.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
710 @item Q
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
711 Query Replace.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
712 @item :ta <name>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
713 Search in the tags file where <name> is defined (file, line), and go to it.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
714 @item :[x,y]s/<p>/<r>/<f>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
715 Substitute (on lines x through y) the pattern <p> (default the last
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
716 pattern) with <r>. Useful
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
717 flags <f> are @samp{g} for @samp{global} (i.e. change every
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
718 non-overlapping occurrence of <p>) and @samp{c} for
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
719 @samp{confirm} (type @samp{y} to confirm a particular
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
720 substitution, else @samp{n}). Instead of @kbd{/} any
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
721 punctuation CHAR unequal to <space> <tab> and <lf> can be used as delimiter.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
722 @item &
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
723 Repeat latest Ex substitute command, e.g. @kbd{:s/wrong/good}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
724 @end table
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
725 @kindex @kbd{&}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
726 @findex @kbd{:substitute/<p>/<r>/<f>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
727 @kindex @kbd{Q}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
728 @kindex @kbd{#g<move>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
729 @findex @kbd{:v/<string>/<cmd>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
730 @findex @kbd{:g/<string>/<cmd>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
731 @findex @kbd{:global/<string>/<cmd>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
732 @findex @kbd{:tag <name>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
733 @kindex @kbd{%}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
734 @kindex @kbd{N}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
735 @kindex @kbd{n}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
736 @kindex @kbd{g<move>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
737 @kindex @kbd{?<string>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
738 @kindex @kbd{/<string>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
739
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
740 @node Yanking,Undoing,Search and Replace,Text Handling
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
741 @subsection Yanking
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
742
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
743 @cindex cut and paste
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
744 @cindex paste
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
745
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
746 @table @kbd
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
747 @item <count> y<move>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
748 Yank from begin to endpoint of <count><move>.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
749 @item <count> "<a-z>y<move>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
750 Yank from begin to endpoint of <count><move> to register.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
751 @item <count> "<A-Z>y<move>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
752 Yank from begin to endpoint of <count><move> and append
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
753 to register.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
754 @item <count> yy
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
755 <count> lines.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
756 @item <count> Y
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
757 Idem (should be equivalent to @kbd{y$} though).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
758 @item m<a-z>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
759 Mark the cursor position with a letter.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
760 @item [<a-z>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
761 Show contents of textmarker.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
762 @item ]<a-z>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
763 Show contents of register.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
764 @item <count> ["<a-z1-9>]p
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
765 Put the contents of the (default undo) buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
766 <count> times after the cursor. The register will
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
767 be automatically downcased.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
768 @item <count> ["<a-z1-9>]P
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
769 Put the contents of the (default undo) buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
770 <count> times before the cursor. The register will
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
771 @end table
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
772 @kindex @kbd{P}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
773 @kindex @kbd{p}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
774 @kindex @kbd{"<a-z1-9>p}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
775 @kindex @kbd{"<a-z1-9>P}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
776 @kindex @kbd{]<a-z>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
777 @kindex @kbd{[<a-z>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
778 @kindex @kbd{m<a-z>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
779 @kindex @kbd{Y}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
780 @kindex @kbd{yy}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
781 @kindex @kbd{"<A-Z>y<move>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
782 @kindex @kbd{"<a-z>y<move>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
783 @kindex @kbd{y<move>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
784 @kindex @kbd{yank}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
785 @findex @kbd{:yank}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
786
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
787 @node Undoing,, Yanking,Text Handling
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
788 @subsection Undoing
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
789
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
790 @cindex undo
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
791 @cindex backup files
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
792
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
793 @table @kbd
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
794 @item u U
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
795 Undo the latest change.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
796 @item .
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
797 Repeat undo.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
798 @item :q!
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
799 Quit Vi without writing.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
800 @item :e!
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
801 Re-edit a messed-up file.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
802 @item :rec
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
803 Recover file from autosave. Viper also creates backup files
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
804 that have a @samp{~} appended to them.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
805 @end table
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
806 @findex @kbd{:rec}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
807 @findex @kbd{:e!}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
808 @findex @kbd{:q!}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
809 @kindex @kbd{.}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
810 @kindex @kbd{U}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
811 @kindex @kbd{u}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
812
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
813 @node Display, File and Buffer Handling, Text Handling, Commands
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
814 @section Display
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
815
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
816 @cindex scrolling
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
817
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
818 @table @kbd
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
819 @item C-g
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
820 At user level 1,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
821 give file name, status, current line number
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
822 and relative position. @*
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
823 At user levels 2 and higher, abort the current command.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
824 @item C-c g
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
825 Give file name, status, current line number and relative position -- all
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
826 user levels.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
827 @item C-l
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
828 Refresh the screen.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
829 @item <count> C-e
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
830 Expose <count> more lines at bottom, cursor stays put (if possible).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
831 @item <count> C-y
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
832 Expose <count> more lines at top, cursor stays put (if possible).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
833 @item <count> C-d
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
834 Scroll <count> lines downward (default the number of the previous scroll;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
835 initialization: half a page).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
836 @item <count> C-u
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
837 Scroll <count> lines upward (default the number of the previous scroll;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
838 initialization: half a page).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
839 @item <count> C-f
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
840 <count> pages forward.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
841 @item <count> C-b
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
842 <count> pages backward (in older versions @kbd{C-b} only works without count).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
843 @item <count> z<cr>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
844 @item zH
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
845 Put line <count> at the top of the window (default the current line).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
846 @item <count> z-
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
847 @item zL
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
848 Put line <count> at the bottom of the window
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
849 (default the current line).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
850 @item <count> z.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
851 @item zM
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
852 Put line <count> in the center of the window
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
853 (default the current line).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
854 @end table
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
855 @kindex @kbd{zM}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
856 @kindex @kbd{zL}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
857 @kindex @kbd{zH}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
858 @kindex @kbd{z<cr>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
859 @kindex @kbd{z.}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
860 @kindex @kbd{z-}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
861 @kindex @kbd{z<cr>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
862 @kindex @kbd{C-b}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
863 @kindex @kbd{C-f}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
864 @kindex @kbd{C-u}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
865 @kindex @kbd{C-d}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
866 @kindex @kbd{C-y}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
867 @kindex @kbd{C-e}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
868 @kindex @kbd{C-l}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
869 @kindex @kbd{C-g}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
870
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
871
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
872 @node File and Buffer Handling, Mapping, Display,Commands
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
873 @section File and Buffer Handling
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
874
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
875 @cindex multiple files
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
876
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
877 In all file handling commands, space should be typed before entering the file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
878 name. If you need to type a modifier, such as @kbd{>>} or @kbd{!}, don't
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
879 put any space between the command and the modifier.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
880
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
881 @table @kbd
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
882 @item :q
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
883 Quit buffer except if modified.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
884 @item :q!
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
885 Quit buffer without checking. In Viper, these two commands
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
886 are identical. Confirmation is required if exiting modified buffers that
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
887 visit files.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
888 @item :susp
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
889 @item :stop
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
890 Suspend Viper
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
891 @item :[x,y] w
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
892 Write the file. Viper nakes sure that a final newline is always added to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
893 any file where this newline is missing. This is done by setting Emacs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
894 variable @code{require-final-newline} to @code{t}. If you don't like this
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
895 feature, use @code{setq-default} to set @code{require-final-newline} to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
896 @code{nil}. This must be done either in @file{.vip} file or in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
897 @code{.emacs} after Viper is loaded.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
898 @item :[x,y] w <name>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
899 Write to the file <name>.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
900 @item :[x,y] w>> <name>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
901 Append the buffer to the file <name>. There should be no space between
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
902 @kbd{w} and @kbd{>>}. Type space after the @kbd{>>} and see what happens.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
903 @item :w! <name>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
904 Overwrite the file <name>. In Viper, @kbd{:w} and @kbd{:w!} are identical.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
905 Confirmation is required for writing to an existing file (if this is not
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
906 the file the buffer is visiting) or to a read-only file.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
907 @item :x,y w <name>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
908 Write lines x through y to the file <name>.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
909 @item :wq
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
910 Write the file and kill buffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
911 @item :r <file> [<file> ...]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
912 Read file into a buffer, inserting its contents after the current line.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
913 @item :xit
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
914 Same as @kbd{:wq}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
915 @item :W
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
916 Save unsaved buffers, asking for confirmation.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
917 @item :WW
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
918 Like @kbd{W}, but without asking for confirmation.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
919 @item ZZ
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
920 Save current buffer and kill it. If user level is 1, then save all files
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
921 and kill Emacs. Killing Emacs is the wrong way to use it, so you should
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
922 switch to higher user levels as soon as possible.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
923 @item :x [<file>]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
924 Save and kill buffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
925 @item :x! [<file>]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
926 @kbd{:w![<file>]} and @kbd{:q}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
927 @item :pre
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
928 Preserve the file -- autosave buffers.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
929 @item :rec
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
930 Recover file from autosave.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
931 @item :f
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
932 Print file name and lines.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
933 @item :cd [<dir>]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
934 Set the working directory to <dir> (default home directory).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
935 @item :pwd
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
936 Print present working directory.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
937 @item :e [+<cmd>] <files>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
938 Edit files. If no filename is given, edit the file visited by the current
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
939 buffer. If buffer was modified or the file changed on disk, ask for
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
940 confirmation. Unlike Vi, Viper allows @kbd{:e} to take multiple arguments.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
941 The first file is edited the same way as in Vi. The rest are visited
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
942 in the usual Emacs way.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
943 @item :e! [+<cmd>] <files>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
944 Re-edit file. If no filename, reedit current file.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
945 In Viper, unlike Vi, @kbd{e!} is identical to @kbd{:e}. In both cases, the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
946 user is asked to confirm if there is a danger of discarding changes to a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
947 buffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
948 @item :q!
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
949 Quit Vi without writing.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
950 @item C-^
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
951 Edit the alternate (normally the previous) file.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
952 @item :rew
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
953 Obsolete
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
954 @item :args
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
955 List files not shown anywhere with counts for next
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
956 @item :n [count] [+<cmd>] [<files>]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
957 Edit <count> file, or edit files. The count comes from :args.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
958 @item :N [count] [+<cmd>] [<files>]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
959 Like @kbd{:n}, but the meaning of the variable
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
960 @var{ex-cycle-other-window} is reversed.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
961 @item :b
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
962 Switch to another buffer. If @var{ex-cycle-other-window} is @code{t},
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
963 switch in another window. Buffer completion is supported.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
964 @item :B
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
965 Like @kbd{:b}, but the meaning of @var{ex-cycle-other-window} is reversed.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
966 @item :<address>r <name>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
967 Read the file <name> into the buffer after the line <address>.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
968 @item v, V, C-v
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
969 Edit a file in current or another window, or in another frame. File name
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
970 is typed in Minibuffer. File completion and history are supported.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
971 @end table
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
972 @kindex @kbd{v}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
973 @kindex @kbd{V}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
974 @findex @kbd{:args}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
975 @findex @kbd{:rew}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
976 @kindex @kbd{C-^}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
977 @findex @kbd{:e! [<files>]}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
978 @findex @kbd{:e [<files>]}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
979 @findex @kbd{:edit [<files>]}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
980 @findex @kbd{:edit! [<files>]}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
981 @findex @kbd{:q!}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
982 @findex @kbd{:q}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
983 @findex @kbd{:quit}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
984 @findex @kbd{:quit!}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
985 @findex @kbd{:f}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
986 @findex @kbd{:rec}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
987 @findex @kbd{:r}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
988 @findex @kbd{:read}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
989 @findex @kbd{:pre}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
990 @kindex @kbd{ZZ}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
991 @findex @kbd{:wq}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
992 @findex @kbd{:w <file>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
993 @findex @kbd{:w! <file>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
994 @findex @kbd{:w >> <file>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
995 @findex @kbd{:write <file>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
996 @findex @kbd{:write! <file>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
997 @findex @kbd{:write >> <file>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
998 @findex @kbd{:W}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
999 @findex @kbd{:WW}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1000 @findex @kbd{:Write}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1001 @findex @kbd{:WWrite}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1002 @findex @kbd{:WWrite}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1003 @findex @kbd{:x}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1004 @findex @kbd{:x!}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1005 @findex @kbd{:susp}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1006 @findex @kbd{:stop}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1007 @findex @kbd{:n [<count> | <file>]}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1008 @findex @kbd{:cd [<dir>]}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1009 @findex @kbd{:pwd}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1010
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1011 @node Mapping, Shell Commands, File and Buffer Handling, Commands
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1012 @section Mapping
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1013
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1014 @cindex keybindings
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1015 @cindex keymapping
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1016
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1017 @table @kbd
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1018 @item :map <string>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1019 Start defining a Vi-style keyboard macro.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1020 For instance, typing
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1021 @kbd{:map www} followed by @kbd{:!wc %} and then typing @kbd{C-x )}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1022 will cause @kbd{www} to run wc on
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1023 current file (Vi replaces @samp{%} with the current file name).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1024 @item C-x )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1025 Finish defining a keyboard macro.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1026 In Viper, this command completes the process of defining all keyboard
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1027 macros, whether they are Emacs-style or Vi-style.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1028 This is a departure from Vi, needed to allow WYSIWYG mapping of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1029 keyboard macros and to permit the use of function keys and arbitrary Emacs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1030 functions in the macros.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1031 @item :unmap <string>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1032 Deprive <string> of its mappings in Vi state.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1033 @item :map! <string>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1034 Map a macro for Insert state.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1035 @item :unmap! <string>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1036 Deprive <string> of its mapping in Insert state (see @kbd{:unmap}).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1037 @item @@<a-z>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1038 In Vi state,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1039 execute the contents of register as a command.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1040 @item @@@@
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1041 In Vi state,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1042 repeat last register command.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1043 @item @@#
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1044 In Vi state,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1045 begin keyboard macro. End with @@<a-z>. This will
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1046 put the macro in the proper register. Register will
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1047 be automatically downcased.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1048 @xref{Macros and Registers}, for more info.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1049 @item @@!<a-z>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1050 In Vi state,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1051 yank anonymous macro to register
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1052 @item *
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1053 In Vi state,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1054 execute anonymous macro (defined by C-x( and C-x )).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1055 @item C-x e
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1056 Like @kbd{*}, but works in all Viper states.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1057 @item #g<move>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1058 Execute the last keyboard macro for each line in the region.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1059 @xref{Macros and Registers}, for more info.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1060 @item [<a-z>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1061 Show contents of textmarker.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1062 @item ]<a-z>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1063 Show contents of register.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1064 @end table
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1065 @kindex @kbd{]<a-z>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1066 @kindex @kbd{[<a-z>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1067 @kindex @kbd{#g<move>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1068 @kindex @kbd{*}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1069 @kindex @kbd{@@!<a-z>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1070 @kindex @kbd{@@#}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1071 @kindex @kbd{@@@@}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1072 @kindex @kbd{@@<a-z>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1073 @findex @kbd{:unmap <char>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1074 @findex @kbd{:map <char> <seq>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1075 @findex @kbd{:unmap! <char>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1076 @findex @kbd{:map! <char> <seq>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1077
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1078 @node Shell Commands, Options, Mapping, Commands
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1079 @section Shell Commands
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1080
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1081 @cindex % (Current file)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1082
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1083 Note that % is used in Ex commands to mean current file. If you want a %
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1084 in your command, it must be escaped as @samp{\%}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1085 @cindex % (Ex address)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1086 However if % is the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1087 first character, it stands as the address for the whole file.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1088 @cindex # (Previous file)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1089 Similarly, @samp{#} expands to the previous file. The previous file is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1090 the first file in @kbd{:args} listing. This defaults
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1091 to the previous file in the VI sense if you have one window.@refill
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1092
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1093 @cindex shell commands
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1094
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1095 @table @kbd
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1096 @item :sh
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1097 Execute a subshell in another window
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1098 @item :[x,y]!<cmd>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1099 Execute a shell <cmd> [on lines x through y;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1100 % is replace by current file, \% is changed to %
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1101 @item :[x,y]!! [<args>]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1102 Repeat last shell command [and append <args>].
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1103 @item :!<cmd>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1104 Just execute command and display result in a buffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1105 @item :!! <args>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1106 Repeat last shell command and append <args>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1107 @item <count> !<move><cmd>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1108 The shell executes <cmd>, with standard
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1109 input the lines described by <count><move>,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1110 next the standard output replaces those lines
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1111 (think of @samp{cb}, @samp{sort}, @samp{nroff}, etc.).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1112 @item <count> !!<cmd>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1113 Give <count> lines as standard input to the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1114 shell <cmd>, next let the standard output
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1115 replace those lines.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1116 @item :[x,y] w !<cmd>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1117 Let lines x to y be standard input for <cmd>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1118 (notice the <sp> between @kbd{w} and @kbd{!}).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1119 @item :<address>r !<cmd>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1120 Put the output of <cmd> after the line <address> (default current).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1121 @item :<address>r <name>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1122 Read the file <name> into the buffer after the line <address> (default
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1123 current).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1124 @end table
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1125 @findex @kbd{:<address>r <name>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1126 @findex @kbd{:<address>r !<cmd>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1127 @findex @kbd{!<cmd>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1128 @findex @kbd{!!<cmd>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1129 @findex @kbd{!<move><cmd>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1130 @findex @kbd{:w !<cmd>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1131 @findex @kbd{:x,y w !<cmd>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1132 @findex @kbd{:!! <args>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1133 @findex @kbd{:!<cmd>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1134 @findex @kbd{:sh}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1135
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1136 @node Options,Emacs Related Commands,Shell Commands,Commands
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1137 @section Options
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1138
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1139 @cindex Vi options
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1140
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1141 @table @kbd
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1142 @item ai
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1143 @cindex autoindent
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1144 autoindent -- In append mode after a <cr> the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1145 cursor will move directly below the first
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1146 CHAR on the previous line.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1147 @item ic
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1148 @cindex case and searching
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1149 ignorecase -- No distinction between upper and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1150 lower cases when searching.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1151 @item magic
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1152 @cindex literal searching
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1153 Regular expressions used in searches; nomagic means no regexps.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1154 @item ro
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1155 @cindex readonly files
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1156 readonly -- The file is not to be changed.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1157 If the user attempts to write to this file, confirmation will be requested.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1158 @item sh=<string>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1159 @cindex shell
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1160 shell -- The program to be used for shell escapes
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1161 (default @samp{$SHELL} (default @file{/bin/sh})).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1162 @item sw=<count>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1163 @cindex layout
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1164 @cindex shifting text
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1165 shiftwidth -- Gives the shiftwidth (default 8 positions).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1166 @item sm
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1167 @cindex paren matching
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1168 @cindex matching parens
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1169 showmatch -- Whenever you append a @kbd{)}, Vi shows
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1170 its match if it's on the same page; also with
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1171 @kbd{@{} and @kbd{@}}. If there's no match, Vi will beep.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1172 @item ts=<count>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1173 @cindex changing tab width
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1174 @cindex tabbing
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1175 tabstop -- The length of a <ht>; warning: this is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1176 only IN the editor, outside of it <ht>s have
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1177 their normal length (default 8 positions).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1178 @item wm=<count>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1179 @cindex auto fill
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1180 @cindex word wrap
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1181 wrapmargin -- In append mode Vi automatically
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1182 puts a <lf> whenever there is a <sp> or <ht>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1183 within <wm> columns from the right margin.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1184 @item ws
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1185 @cindex searching
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1186 wrapscan -- When searching, the end is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1187 considered @samp{stuck} to the begin of the file.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1188 @item :set <option>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1189 Turn <option> on.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1190 @item :set no<option>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1191 Turn <option> off.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1192 @item :set <option>=<value>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1193 Set <option> to <value>.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1194 @end table
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1195 @findex @kbd{:set <option>=<value>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1196 @findex @kbd{:set no<option>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1197 @findex @kbd{:set <option>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1198 @findex @kbd{:set ws}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1199 @findex @kbd{:set wrapscan}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1200 @findex @kbd{:set wm=<count>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1201 @findex @kbd{:set wrapmargin=<count>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1202 @findex @kbd{:set ts=<count>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1203 @findex @kbd{:set tabstop=<count>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1204 @findex @kbd{:set tab-stop-local=<count>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1205 @findex @kbd{:set sm}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1206 @findex @kbd{:set showmatch}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1207 @findex @kbd{:set sw=<count>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1208 @findex @kbd{:set shiftwidth=<count>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1209 @findex @kbd{:set sh=<string>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1210 @findex @kbd{:set shell=<string>}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1211 @findex @kbd{:set ro}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1212 @findex @kbd{:set readonly}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1213 @findex @kbd{:set magic}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1214 @findex @kbd{:set ic}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1215 @findex @kbd{:set ignorecase}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1216 @findex @kbd{:set ai}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1217 @findex @kbd{:set autoindent}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1218
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1219 @node Emacs Related Commands,,Options,Commands
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1220 @section Emacs Related Commands
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1221
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1222 @table @kbd
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1223 @item _
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1224 Begin Meta command in Vi state. Most often used as _x (M-x).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1225 @item C-z
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1226 Begin Meta command in Insert state.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1227 @item C-z
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1228 Switch between Emacs and Vi states.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1229 @item C-x0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1230 Close Window
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1231 @item C-x1
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1232 Close Other Windows
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1233 @item C-x2
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1234 Split Window
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1235 @item C-xo
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1236 Move among windows
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1237 @item C-xC-f
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1238 Emacs find-file, useful in Insert state
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1239 @item C-y
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1240 Put back the last killed text. Similar to Vi's @kbd{p}, but also works in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1241 Insert and Replace state. This command doesn't work in Vi command state,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1242 since this binding is taken for something else.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1243 @item M-y
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1244 Undoes the last @kbd{C-y} and puts another kill from the kill ring.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1245 Using this command, you can try may different kills until you find the one
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1246 you need.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1247 @end table
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1248 @kindex @kbd{M-y}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1249 @kindex @kbd{C-y}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1250 @kindex @kbd{C-xC-f}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1251 @kindex @kbd{C-xo}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1252 @kindex @kbd{C-x2}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1253 @kindex @kbd{C-x1}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1254 @kindex @kbd{C-x0}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1255 @kindex @kbd{C-z}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1256 @kindex @kbd{C-z}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1257 @kindex @kbd{_}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1258
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1259 @node Mouse-bound Commands,,,Commands
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1260 @section Mouse-bound Commands
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1261
12
bcdc7deadc19 Import from CVS: tag r19-15b7
cvs
parents: 2
diff changeset
1262 The following two mouse actions are normally bound to to special search and
bcdc7deadc19 Import from CVS: tag r19-15b7
cvs
parents: 2
diff changeset
1263 insert commands in of Viper:
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1264
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1265 @table @kbd
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1266 @item S-mouse-1 (Emacs)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1267 @item meta button1up (XEmacs)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1268 Holding Shift (or Meta, if XEmacs) and clicking mouse button 1 will
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1269 initiate search for
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1270 a region under the mouse pointer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1271 This command can take a prefix argument. Note: Viper sets this
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1272 binding only if this mouse action is not
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1273 already bound to something else.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1274 @xref{Viper Specials}, for more information.@refill
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1275
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1276 @item S-mouse-2 (Emacs)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1277 @item meta button2up (XEmacs)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1278 Holding Shift (or Meta, if XEmacs) and clicking button 2 of the mouse will
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1279 insert a region surrounding the mouse pointer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1280 This command can also take a prefix argument.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1281 Note: Viper sets this binding only if this mouse action is not
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1282 already bound to something else.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1283 @xref{Viper Specials}, for more details.@refill
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1284 @end table
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1285 @kindex @kbd{S-mouse-1}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1286 @kindex @kbd{S-mouse-2}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1287 @kindex @kbd{meta button1up}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1288 @kindex @kbd{meta button2up}