annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/share/man/man7/editline.7 @ 68:5028fdace37b

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 16:23:26 -0400
parents
children
rev   line source
jpayne@68 1 .TH EDITLINE 7 "April 6, 2024" ""
jpayne@68 2 .SH NAME
jpayne@68 3 \fBeditline\fP
jpayne@68 4 \- line editing user interface
jpayne@68 5 .SH DESCRIPTION
jpayne@68 6 When a program using the
jpayne@68 7 \fBeditline\fP(3)
jpayne@68 8 library prompts for an input string using the function
jpayne@68 9 \fBel_wgets\fP(3),
jpayne@68 10 it reads characters from the terminal.
jpayne@68 11 Invalid input bytes that do not form characters are silently
jpayne@68 12 discarded.
jpayne@68 13 For each character read, one editor command is executed.
jpayne@68 14 The mapping of input characters to editor commands depends on the
jpayne@68 15 editing mode.
jpayne@68 16 There are three editing modes: vi insert mode, vi command mode,
jpayne@68 17 and emacs mode.
jpayne@68 18 The default is vi insert mode.
jpayne@68 19 The program can switch the default to emacs mode by using the
jpayne@68 20 \fBel_set\fP(3)
jpayne@68 21 or
jpayne@68 22 \fBel_parse\fP(3)
jpayne@68 23 functions, and the user can switch to emacs mode either in the
jpayne@68 24 \fBeditrc\fP(5)
jpayne@68 25 configuration file or interactively with the
jpayne@68 26 \fBed-command\fP
jpayne@68 27 editor command, in all three cases executing the
jpayne@68 28 \fBbind Fl e\fP
jpayne@68 29 builtin command.
jpayne@68 30
jpayne@68 31 If trying to read from the terminal results in end of file or an
jpayne@68 32 error, the library signals end of file to the program and does not
jpayne@68 33 return a string.
jpayne@68 34 .SS Input character bindings
jpayne@68 35 All default bindings described below can be overridden by individual
jpayne@68 36 programs and can be changed with the
jpayne@68 37 \fBeditrc\fP(5)
jpayne@68 38 \fBbind\fP
jpayne@68 39 builtin command.
jpayne@68 40
jpayne@68 41 In the following tables,
jpayne@68 42 `Ctrl-'
jpayne@68 43 indicates a character with the bit 0x40 flipped, and
jpayne@68 44 `Meta-'
jpayne@68 45 indicates a character with the bit 0x80 set.
jpayne@68 46 In vi insert mode and in emacs mode, all Meta-characters considered
jpayne@68 47 printable by the current
jpayne@68 48 \fBlocale\fP(1)
jpayne@68 49 are bound to
jpayne@68 50 \fBed-insert\fP
jpayne@68 51 instead of to the editor command listed below.
jpayne@68 52 Consequently, in UTF-8 mode, most of the Meta-characters are not
jpayne@68 53 directly accessible because their code points are occupied by
jpayne@68 54 printable Unicode characters, and Meta-characters are usually input
jpayne@68 55 using the
jpayne@68 56 \fBem-meta-next\fP
jpayne@68 57 editor command.
jpayne@68 58 For example, to enter
jpayne@68 59 `Meta-B'
jpayne@68 60 in order to call the
jpayne@68 61 \fBed-prev-word\fP
jpayne@68 62 editor command in emacs mode, call
jpayne@68 63 \fBem-meta-next\fP
jpayne@68 64 by pressing and releasing the escape key (or equivalently, Ctrl-[),
jpayne@68 65 then press and release the
jpayne@68 66 `B'
jpayne@68 67 key.
jpayne@68 68 If you have configured a Meta-key on your keyboard, for example
jpayne@68 69 with
jpayne@68 70 `setxkbmap' -option altwin:left_meta_win ,
jpayne@68 71 the Ctrl-Meta-characters are directly accessible.
jpayne@68 72 For example, to enter
jpayne@68 73 `Ctrl-Meta-H'
jpayne@68 74 in order to call the
jpayne@68 75 \fBed-delete-prev-word\fP
jpayne@68 76 editor command in emacs mode, hold down the keys
jpayne@68 77 `Ctrl',
jpayne@68 78 `Meta',
jpayne@68 79 and
jpayne@68 80 `H'
jpayne@68 81 at the same time.
jpayne@68 82 Alternatively, press and release the escape key, then press and
jpayne@68 83 release
jpayne@68 84 `Ctrl-H'.
jpayne@68 85
jpayne@68 86 In vi input mode, input characters are bound to the following editor
jpayne@68 87 commands by default:
jpayne@68 88 It Ctrl-D, EOF Ta \fBvi-list-or-eof\fP
jpayne@68 89 It Ctrl-H, BS Ta \fBvi-delete-prev-char\fP
jpayne@68 90 It Ctrl-J, LF Ta \fBed-newline\fP
jpayne@68 91 It Ctrl-M, CR Ta \fBed-newline\fP
jpayne@68 92 It Ctrl-Q Ta \fBed-tty-start-output\fP
jpayne@68 93 It Ctrl-S Ta \fBed-tty-stop-output\fP
jpayne@68 94 It Ctrl-U Ta \fBvi-kill-line-prev\fP
jpayne@68 95 It Ctrl-V Ta \fBed-quoted-insert\fP
jpayne@68 96 It Ctrl-W Ta \fBed-delete-prev-word\fP
jpayne@68 97 It Ctrl-[, ESC Ta \fBvi-command-mode\fP
jpayne@68 98 It Ctrl-\e, QUIT Ta \fBed-tty-sigquit\fP
jpayne@68 99 It Ctrl-?, DEL Ta \fBvi-delete-prev-char\fP
jpayne@68 100
jpayne@68 101 All other input characters except the NUL character (Ctrl-@) are
jpayne@68 102 bound to
jpayne@68 103 \fBed-insert\fP.
jpayne@68 104
jpayne@68 105 In vi command mode, input characters are bound to the following
jpayne@68 106 editor commands by default:
jpayne@68 107 It Ctrl-A Ta \fBed-move-to-beg\fP
jpayne@68 108 It Ctrl-C, INT Ta \fBed-tty-sigint\fP
jpayne@68 109 It Ctrl-E Ta \fBed-move-to-end\fP
jpayne@68 110 It Ctrl-H, BS Ta \fBed-delete-prev-char\fP
jpayne@68 111 It Ctrl-J, LF Ta \fBed-newline\fP
jpayne@68 112 It Ctrl-K Ta \fBed-kill-line\fP
jpayne@68 113 It Ctrl-L, FF Ta \fBed-clear-screen\fP
jpayne@68 114 It Ctrl-M, CR Ta \fBed-newline\fP
jpayne@68 115 It Ctrl-N Ta \fBed-next-history\fP
jpayne@68 116 It Ctrl-O Ta \fBed-tty-flush-output\fP
jpayne@68 117 It Ctrl-P Ta \fBed-prev-history\fP
jpayne@68 118 It Ctrl-Q Ta \fBed-tty-start-output\fP
jpayne@68 119 It Ctrl-R Ta \fBed-redisplay\fP
jpayne@68 120 It Ctrl-S Ta \fBed-tty-stop-output\fP
jpayne@68 121 It Ctrl-U Ta \fBvi-kill-line-prev\fP
jpayne@68 122 It Ctrl-W Ta \fBed-delete-prev-word\fP
jpayne@68 123 It Ctrl-[, ESC Ta \fBem-meta-next\fP
jpayne@68 124 It Ctrl-\e, QUIT Ta \fBed-tty-sigquit\fP
jpayne@68 125 It Space Ta \fBed-next-char\fP
jpayne@68 126 It # Ta \fBvi-comment-out\fP
jpayne@68 127 It $ Ta \fBed-move-to-end\fP
jpayne@68 128 It % Ta \fBvi-match\fP
jpayne@68 129 It + Ta \fBed-next-history\fP
jpayne@68 130 It \&, Ta \fBvi-repeat-prev-char\fP
jpayne@68 131 It - Ta \fBed-prev-history\fP
jpayne@68 132 It \&. Ta \fBvi-redo\fP
jpayne@68 133 It / Ta \fBvi-search-prev\fP
jpayne@68 134 It 0 Ta \fBvi-zero\fP
jpayne@68 135 It 1 to 9 Ta \fBed-argument-digit\fP
jpayne@68 136 It \&: Ta \fBed-command\fP
jpayne@68 137 It \&; Ta \fBvi-repeat-next-char\fP
jpayne@68 138 It \&? Ta \fBvi-search-next\fP
jpayne@68 139 It @ Ta \fBvi-alias\fP
jpayne@68 140 It A Ta \fBvi-add-at-eol\fP
jpayne@68 141 It B Ta \fBvi-prev-big-word\fP
jpayne@68 142 It C Ta \fBvi-change-to-eol\fP
jpayne@68 143 It D Ta \fBed-kill-line\fP
jpayne@68 144 It E Ta \fBvi-end-big-word\fP
jpayne@68 145 It F Ta \fBvi-prev-char\fP
jpayne@68 146 It G Ta \fBvi-to-history-line\fP
jpayne@68 147 It I Ta \fBvi-insert-at-bol\fP
jpayne@68 148 It J Ta \fBed-search-next-history\fP
jpayne@68 149 It K Ta \fBed-search-prev-history\fP
jpayne@68 150 It N Ta \fBvi-repeat-search-prev\fP
jpayne@68 151 It O Ta \fBed-sequence-lead-in\fP
jpayne@68 152 It P Ta \fBvi-paste-prev\fP
jpayne@68 153 It R Ta \fBvi-replace-mode\fP
jpayne@68 154 It S Ta \fBvi-substitute-line\fP
jpayne@68 155 It T Ta \fBvi-to-prev-char\fP
jpayne@68 156 It U Ta \fBvi-undo-line\fP
jpayne@68 157 It W Ta \fBvi-next-big-word\fP
jpayne@68 158 It X Ta \fBed-delete-prev-char\fP
jpayne@68 159 It Y Ta \fBvi-yank-end\fP
jpayne@68 160 It \&[ Ta \fBed-sequence-lead-in\fP
jpayne@68 161 It ^ Ta \fBed-move-to-beg\fP
jpayne@68 162 It _ Ta \fBvi-history-word\fP
jpayne@68 163 It a Ta \fBvi-add\fP
jpayne@68 164 It b Ta \fBvi-prev-word\fP
jpayne@68 165 It c Ta \fBvi-change-meta\fP
jpayne@68 166 It d Ta \fBvi-delete-meta\fP
jpayne@68 167 It e Ta \fBvi-end-word\fP
jpayne@68 168 It f Ta \fBvi-next-char\fP
jpayne@68 169 It h Ta \fBed-prev-char\fP
jpayne@68 170 It i Ta \fBvi-insert\fP
jpayne@68 171 It j Ta \fBed-next-history\fP
jpayne@68 172 It k Ta \fBed-prev-history\fP
jpayne@68 173 It l Ta \fBed-next-char\fP
jpayne@68 174 It n Ta \fBvi-repeat-search-next\fP
jpayne@68 175 It p Ta \fBvi-paste-next\fP
jpayne@68 176 It r Ta \fBvi-replace-char\fP
jpayne@68 177 It s Ta \fBvi-substitute-char\fP
jpayne@68 178 It t Ta \fBvi-to-next-char\fP
jpayne@68 179 It u Ta \fBvi-undo\fP
jpayne@68 180 It v Ta \fBvi-histedit\fP
jpayne@68 181 It w Ta \fBvi-next-word\fP
jpayne@68 182 It x Ta \fBed-delete-next-char\fP
jpayne@68 183 It y Ta \fBvi-yank\fP
jpayne@68 184 It \&| Ta \fBvi-to-column\fP
jpayne@68 185 It ~ Ta \fBvi-change-case\fP
jpayne@68 186 It Ctrl-?, DEL Ta \fBed-delete-prev-char\fP
jpayne@68 187 It Meta-O Ta \fBed-sequence-lead-in\fP
jpayne@68 188 It Meta-[ Ta \fBed-sequence-lead-in\fP
jpayne@68 189
jpayne@68 190 In emacs mode, input characters are bound to the following editor
jpayne@68 191 commands by default:
jpayne@68 192 It 0 to 9 Ta \fBed-digit\fP
jpayne@68 193 It Ctrl-@, NUL Ta \fBem-set-mark\fP
jpayne@68 194 It Ctrl-A Ta \fBed-move-to-beg\fP
jpayne@68 195 It Ctrl-B Ta \fBed-prev-char\fP
jpayne@68 196 It Ctrl-C, INT Ta \fBed-tty-sigint\fP
jpayne@68 197 It Ctrl-D, EOF Ta \fBem-delete-or-list\fP
jpayne@68 198 It Ctrl-E Ta \fBed-move-to-end\fP
jpayne@68 199 It Ctrl-F Ta \fBed-next-char\fP
jpayne@68 200 It Ctrl-H, BS Ta \fBem-delete-prev-char\fP
jpayne@68 201 It Ctrl-J, LF Ta \fBed-newline\fP
jpayne@68 202 It Ctrl-K Ta \fBed-kill-line\fP
jpayne@68 203 It Ctrl-L, FF Ta \fBed-clear-screen\fP
jpayne@68 204 It Ctrl-M, CR Ta \fBed-newline\fP
jpayne@68 205 It Ctrl-N Ta \fBed-next-history\fP
jpayne@68 206 It Ctrl-O Ta \fBed-tty-flush-output\fP
jpayne@68 207 It Ctrl-P Ta \fBed-prev-history\fP
jpayne@68 208 It Ctrl-Q Ta \fBed-tty-start-output\fP
jpayne@68 209 It Ctrl-R Ta \fBed-redisplay\fP
jpayne@68 210 It Ctrl-S Ta \fBed-tty-stop-output\fP
jpayne@68 211 It Ctrl-T Ta \fBed-transpose-chars\fP
jpayne@68 212 It Ctrl-U Ta \fBed-kill-line\fP
jpayne@68 213 It Ctrl-V Ta \fBed-quoted-insert\fP
jpayne@68 214 It Ctrl-W Ta \fBem-kill-region\fP
jpayne@68 215 It Ctrl-X Ta \fBed-sequence-lead-in\fP
jpayne@68 216 It Ctrl-Y Ta \fBem-yank\fP
jpayne@68 217 It Ctrl-Z, TSTP Ta \fBed-tty-sigtstp\fP
jpayne@68 218 It Ctrl-[, ESC Ta \fBem-meta-next\fP
jpayne@68 219 It Ctrl-\e, QUIT Ta \fBed-tty-sigquit\fP
jpayne@68 220 It Ctrl-] Ta \fBed-tty-dsusp\fP
jpayne@68 221 It Ctrl-?, DEL Ta \fBem-delete-prev-char\fP
jpayne@68 222 It Ctrl-Meta-H Ta \fBed-delete-prev-word\fP
jpayne@68 223 It Ctrl-Meta-L Ta \fBed-clear-screen\fP
jpayne@68 224 It Ctrl-Meta-_ Ta \fBem-copy-prev-word\fP
jpayne@68 225 It Meta-0 to 9 Ta \fBed-argument-digit\fP
jpayne@68 226 It Meta-B Ta \fBed-prev-word\fP
jpayne@68 227 It Meta-C Ta \fBem-capitol-case\fP
jpayne@68 228 It Meta-D Ta \fBem-delete-next-word\fP
jpayne@68 229 It Meta-F Ta \fBem-next-word\fP
jpayne@68 230 It Meta-L Ta \fBem-lower-case\fP
jpayne@68 231 It Meta-N Ta \fBed-search-next-history\fP
jpayne@68 232 It Meta-O Ta \fBed-sequence-lead-in\fP
jpayne@68 233 It Meta-P Ta \fBed-search-prev-history\fP
jpayne@68 234 It Meta-U Ta \fBem-upper-case\fP
jpayne@68 235 It Meta-W Ta \fBem-copy-region\fP
jpayne@68 236 It Meta-X Ta \fBed-command\fP
jpayne@68 237 It Meta-[ Ta \fBed-sequence-lead-in\fP
jpayne@68 238 It Meta-b Ta \fBed-prev-word\fP
jpayne@68 239 It Meta-c Ta \fBem-capitol-case\fP
jpayne@68 240 It Meta-d Ta \fBem-delete-next-word\fP
jpayne@68 241 It Meta-f Ta \fBem-next-word\fP
jpayne@68 242 It Meta-l Ta \fBem-lower-case\fP
jpayne@68 243 It Meta-n Ta \fBed-search-next-history\fP
jpayne@68 244 It Meta-p Ta \fBed-search-prev-history\fP
jpayne@68 245 It Meta-u Ta \fBem-upper-case\fP
jpayne@68 246 It Meta-w Ta \fBem-copy-region\fP
jpayne@68 247 It Meta-x Ta \fBed-command\fP
jpayne@68 248 It Ctrl-Meta-? Ta \fBed-delete-prev-word\fP
jpayne@68 249
jpayne@68 250 The remaining
jpayne@68 251 \fBascii\fP(7)
jpayne@68 252 characters in the range 0x20 to 0x7e are bound to
jpayne@68 253 \fBed-insert\fP.
jpayne@68 254
jpayne@68 255 If standard output is not connected to a terminal device
jpayne@68 256 or
jpayne@68 257 \fBel_set\fP(3)
jpayne@68 258 was used to set
jpayne@68 259 EL_EDITMODE
jpayne@68 260 to 0, all input character bindings are disabled and all characters
jpayne@68 261 typed are appended to the edit buffer.
jpayne@68 262 In that case, the edit buffer is returned to the program after a
jpayne@68 263 newline or carriage return character is typed, or after the first
jpayne@68 264 character typed if
jpayne@68 265 \fBel_set\fP(3)
jpayne@68 266 was used to set
jpayne@68 267 EL_UNBUFFERED
jpayne@68 268 to non-zero.
jpayne@68 269 .SS Editor commands
jpayne@68 270 Most editor commands accept an optional argument.
jpayne@68 271 The argument is entered by prefixing the editor command with one
jpayne@68 272 or more of the editor commands
jpayne@68 273 \fBed-argument-digit\fP,
jpayne@68 274 \fBed-digit\fP,
jpayne@68 275 \fBem-universal-argument\fP,
jpayne@68 276 or
jpayne@68 277 \fBvi-zero\fP.
jpayne@68 278 When an argument is not provided, it defaults to 1.
jpayne@68 279 For most editor commands, the effect of an argument is to repeatedly
jpayne@68 280 execute the command that number of times.
jpayne@68 281
jpayne@68 282 When talking about a character string from a left character to a
jpayne@68 283 right character, the left character is included in the string, while
jpayne@68 284 the right character is not included.
jpayne@68 285
jpayne@68 286 If an editor command causes an error, the input character is discarded,
jpayne@68 287 no action occurs, and the terminal bell is rung.
jpayne@68 288 In case of a non-fatal error, the terminal bell is also rung,
jpayne@68 289 but the editor command takes effect anyway.
jpayne@68 290
jpayne@68 291 In the following list, the default key bindings are listed after
jpayne@68 292 each editor command.
jpayne@68 293 .TP
jpayne@68 294 \fBed-argument-digit Pq vi command: 1 to 9; emacs: Meta-0 to Meta-9\fP
jpayne@68 295 If in argument input mode, append the input digit to the argument
jpayne@68 296 being read.
jpayne@68 297 Otherwise, switch to argument input mode and use the input digit
jpayne@68 298 as the most significant digit of the argument.
jpayne@68 299 It is an error if the input character is not a digit or if the
jpayne@68 300 existing argument is already greater than a million.
jpayne@68 301 .TP
jpayne@68 302 \fBed-clear-screen Pq vi command: Ctrl-L; emacs: Ctrl-L, Ctrl-Meta-L\fP
jpayne@68 303 Clear the screen and display the edit buffer at the top.
jpayne@68 304 Ignore any argument.
jpayne@68 305 .TP
jpayne@68 306 \fBed-command Pq vi command: So \&: Sc ; emacs: Meta-X, Meta-x\fP
jpayne@68 307 Read a line from the terminal bypassing the normal line editing
jpayne@68 308 functionality and execute that line as an
jpayne@68 309 \fBeditrc\fP(5)
jpayne@68 310 builtin command.
jpayne@68 311 If in vi command mode, also switch back to vi insert mode.
jpayne@68 312 Ignore any argument.
jpayne@68 313 .TP
jpayne@68 314 \fBed-delete-next-char Pq vi command: x\fP
jpayne@68 315 Delete the character at the cursor position.
jpayne@68 316 With an argument, delete that number of characters.
jpayne@68 317 In emacs mode, it is an error if the cursor is at the end of the
jpayne@68 318 edit buffer.
jpayne@68 319 In vi mode, the last character in the edit buffer is deleted in
jpayne@68 320 that case, and it is an error if the buffer is empty.
jpayne@68 321 .TP
jpayne@68 322 \fBed-delete-prev-char Pq vi command: X, Ctrl-H, BS, Ctrl-?, DEL\fP
jpayne@68 323 Delete the character to the left of the cursor position.
jpayne@68 324 With an argument, delete that number of characters.
jpayne@68 325 It is an error if the cursor is at the beginning of the edit buffer.
jpayne@68 326 .TP
jpayne@68 327 \fBed-delete-prev-word Pq vi: Ctrl-W; emacs: Ctrl-Meta-H, Ctrl-Meta-?\fP
jpayne@68 328 Move to the left to the closest beginning of a word, delete the
jpayne@68 329 string from that position to the cursor, and save it to the cut
jpayne@68 330 buffer.
jpayne@68 331 With an argument, delete that number of words.
jpayne@68 332 It is an error if the cursor is at the beginning of the edit buffer.
jpayne@68 333 .TP
jpayne@68 334 \fBed-digit Pq emacs: 0 to 9\fP
jpayne@68 335 If in argument input mode, append the input digit to the argument
jpayne@68 336 being read.
jpayne@68 337 Otherwise, call
jpayne@68 338 \fBed-insert\fP.
jpayne@68 339 It is an error if the input character is not a digit or if the
jpayne@68 340 existing argument is already greater than a million.
jpayne@68 341 .TP
jpayne@68 342 \fBed-end-of-file Pq not bound by default\fP
jpayne@68 343 Discard the edit buffer and indicate end of file to the program.
jpayne@68 344 Ignore any argument.
jpayne@68 345 .TP
jpayne@68 346 \fBed-ignore Pq various\fP
jpayne@68 347 Discard the input character and do nothing.
jpayne@68 348 .TP
jpayne@68 349 \fBed-insert Pq vi input: almost all; emacs: printable characters\fP
jpayne@68 350 In insert mode, insert the input character left of the cursor
jpayne@68 351 position.
jpayne@68 352 In replace mode, overwrite the character at the cursor and move the
jpayne@68 353 cursor to the right by one character position.
jpayne@68 354 Accept an argument to do this repeatedly.
jpayne@68 355 It is an error if the input character is the NUL character (Ctrl-@).
jpayne@68 356 Failure to enlarge the edit buffer also results in an error.
jpayne@68 357 .TP
jpayne@68 358 \fBed-kill-line Pq vi command: D, Ctrl-K; emacs: Ctrl-K, Ctrl-U\fP
jpayne@68 359 Delete the string from the cursor position to the end of the line
jpayne@68 360 and save it to the cut buffer.
jpayne@68 361 Ignore any argument.
jpayne@68 362 .TP
jpayne@68 363 \fBed-move-to-beg Pq vi command: ^, Ctrl-A; emacs: Ctrl-A\fP
jpayne@68 364 In vi mode, move the cursor to the first non-space character in the
jpayne@68 365 edit buffer.
jpayne@68 366 In emacs mode, move the cursor to the beginning of the edit buffer.
jpayne@68 367 Ignore any argument.
jpayne@68 368 Can be used as a movement command after
jpayne@68 369 \fBvi_change_meta\fP,
jpayne@68 370 \fBvi_delete_meta\fP,
jpayne@68 371 or
jpayne@68 372 \fBvi_yank\fP.
jpayne@68 373 .TP
jpayne@68 374 \fBed-move-to-end Pq vi command: $, Ctrl-E; emacs: Ctrl-E\fP
jpayne@68 375 Move the cursor to the end of the edit buffer.
jpayne@68 376 Ignore any argument.
jpayne@68 377 Can be used as a movement command after
jpayne@68 378 \fBvi_change_meta\fP,
jpayne@68 379 \fBvi_delete_meta\fP,
jpayne@68 380 or
jpayne@68 381 \fBvi_yank\fP.
jpayne@68 382 .TP
jpayne@68 383 \fBed-newline Pq all modes: Ctrl-J, LF, Ctrl-M, CR\fP
jpayne@68 384 Append a newline character to the edit buffer and return the edit
jpayne@68 385 buffer to the program.
jpayne@68 386 Ignore any argument.
jpayne@68 387 .TP
jpayne@68 388 \fBed-next-char Pq vi command: Space, l; emacs: Ctrl-F\fP
jpayne@68 389 Move the cursor one character position to the right.
jpayne@68 390 With an argument, move by that number of characters.
jpayne@68 391 Can be used as a movement command after
jpayne@68 392 \fBvi_change_meta\fP,
jpayne@68 393 \fBvi_delete_meta\fP,
jpayne@68 394 or
jpayne@68 395 \fBvi_yank\fP.
jpayne@68 396 It is an error if the cursor is already at the end of the edit
jpayne@68 397 buffer.
jpayne@68 398 .TP
jpayne@68 399 \fBed-next-history Pq vi command: j, +, Ctrl-N; emacs: Ctrl-N\fP
jpayne@68 400 Replace the edit buffer with the next history line.
jpayne@68 401 That line is older than the current line.
jpayne@68 402 With an argument, go forward by that number of history lines.
jpayne@68 403 It is a non-fatal error to advance by more lines than are available.
jpayne@68 404 .TP
jpayne@68 405 \fBed-next-line Pq not bound by default\fP
jpayne@68 406 Move the cursor down one line.
jpayne@68 407 With an argument, move down by that number of lines.
jpayne@68 408 It is an error if the edit buffer does not contain enough newline
jpayne@68 409 characters to the right of the cursor position.
jpayne@68 410 .TP
jpayne@68 411 \fBed-prev-char Pq vi command: h; emacs: Ctrl-B\fP
jpayne@68 412 Move the cursor one character position to the left.
jpayne@68 413 With an argument, move by that number of characters.
jpayne@68 414 Can be used as a movement command after
jpayne@68 415 \fBvi_change_meta\fP,
jpayne@68 416 \fBvi_delete_meta\fP,
jpayne@68 417 or
jpayne@68 418 \fBvi_yank\fP.
jpayne@68 419 It is an error if the cursor is already at the beginning of the
jpayne@68 420 edit buffer.
jpayne@68 421 .TP
jpayne@68 422 \fBed-prev-history Pq vi command: k, -, Ctrl-P; emacs: Ctrl-P\fP
jpayne@68 423 Replace the edit buffer with the previous history line.
jpayne@68 424 That line is newer than the current line.
jpayne@68 425 With an argument, go back by that number of lines.
jpayne@68 426 It is a non-fatal error to back up by more lines than are available.
jpayne@68 427 .TP
jpayne@68 428 \fBed-prev-line Pq not bound by default\fP
jpayne@68 429 Move the cursor up one line.
jpayne@68 430 With an argument, move up by that number of lines.
jpayne@68 431 It is an error if the edit buffer does not contain enough newline
jpayne@68 432 characters to the left of the cursor position.
jpayne@68 433 .TP
jpayne@68 434 \fBed-prev-word Pq emacs: Meta-B, Meta-b\fP
jpayne@68 435 Move the cursor to the left to the closest beginning of a word.
jpayne@68 436 With an argument, repeat that number of times.
jpayne@68 437 Can be used as a movement command after
jpayne@68 438 \fBvi_change_meta\fP,
jpayne@68 439 \fBvi_delete_meta\fP,
jpayne@68 440 or
jpayne@68 441 \fBvi_yank\fP.
jpayne@68 442 It is an error if the cursor is already at the beginning of the
jpayne@68 443 edit buffer.
jpayne@68 444 .TP
jpayne@68 445 \fBed-quoted-insert Pq vi insert, emacs: Ctrl-V\fP
jpayne@68 446 Read one character from the terminal bypassing the normal line
jpayne@68 447 editing functionality and call
jpayne@68 448 \fBed-insert\fP
jpayne@68 449 on it.
jpayne@68 450 If trying to read the character returns end of file or an error,
jpayne@68 451 call
jpayne@68 452 \fBed-end-of-file\fP
jpayne@68 453 instead.
jpayne@68 454 .TP
jpayne@68 455 \fBed-redisplay Pq vi command, emacs: Ctrl-R\fP
jpayne@68 456 Redisplay everything.
jpayne@68 457 Ignore any argument.
jpayne@68 458 .TP
jpayne@68 459 \fBed-search-next-history Pq vi command: J; emacs: Meta-N, Meta-n\fP
jpayne@68 460 Replace the edit buffer with the next matching history entry.
jpayne@68 461 .TP
jpayne@68 462 \fBed-search-prev-history Pq vi command: K; emacs: Meta-P, Meta-p\fP
jpayne@68 463 Replace the edit buffer with the previous matching history entry.
jpayne@68 464 .TP
jpayne@68 465 \fBed-sequence-lead-in Pq vi cmd: O, \&[; emacs: Ctrl-X;\\fP
jpayne@68 466 both: Meta-O, Meta-[
jpayne@68 467 Call a macro.
jpayne@68 468 See the section about
jpayne@68 469 .B Macros
jpayne@68 470 below for details.
jpayne@68 471 .TP
jpayne@68 472 \fBed-start-over Pq not bound by default\fP
jpayne@68 473 Discard the contents of the edit buffer and start from scratch.
jpayne@68 474 Ignore any argument.
jpayne@68 475 .TP
jpayne@68 476 \fBed-transpose-chars Pq emacs: Ctrl-T\fP
jpayne@68 477 Exchange the character at the cursor position with the one to the
jpayne@68 478 left of it and move the cursor to the character to the right of the
jpayne@68 479 two exchanged characters.
jpayne@68 480 Ignore any argument.
jpayne@68 481 It is an error if the cursor is at the beginning of the edit buffer
jpayne@68 482 or if the edit buffer contains less than two characters.
jpayne@68 483 .TP
jpayne@68 484 \fBed-unassigned Pq all characters not listed\fP
jpayne@68 485 This editor command always results in an error.
jpayne@68 486 .TP
jpayne@68 487 \fBem-capitol-case Pq emacs: Meta-C, Meta-c\fP
jpayne@68 488 Capitalize the string from the cursor to the end of the current
jpayne@68 489 word.
jpayne@68 490 That is, if it contains at least one alphabetic character, convert
jpayne@68 491 the first alphabetic character to upper case, and convert all
jpayne@68 492 characters to the right of it to lower case.
jpayne@68 493 In any case, move the cursor to the next character after the end
jpayne@68 494 of the current word.
jpayne@68 495 .TP
jpayne@68 496 \fBem-copy-prev-word Pq emacs: Ctrl-Meta-_\fP
jpayne@68 497 Copy the string from the beginning of the current word to the cursor
jpayne@68 498 and insert it to the left of the cursor.
jpayne@68 499 Move the cursor to the character after the inserted string.
jpayne@68 500 It is an error if the cursor is at the beginning of the edit buffer.
jpayne@68 501 .TP
jpayne@68 502 \fBem-copy-region Pq emacs: Meta-W, Meta-w\fP
jpayne@68 503 Copy the string from the cursor to the mark to the cut buffer.
jpayne@68 504 It is an error if the mark is not set.
jpayne@68 505 .TP
jpayne@68 506 \fBem-delete-next-word Pq emacs: Meta-D, Meta-d\fP
jpayne@68 507 Delete the string from the cursor to the end of the current word
jpayne@68 508 and save it to the cut buffer.
jpayne@68 509 It is an error if the cursor is at the end of the edit buffer.
jpayne@68 510 .TP
jpayne@68 511 \fBem-delete-or-list Pq emacs: Ctrl-D, EOF\fP
jpayne@68 512 If the cursor is not at the end of the line, delete the character
jpayne@68 513 at the cursor.
jpayne@68 514 If the edit buffer is empty, indicate end of file to the program.
jpayne@68 515 It is an error if the cursor is at the end of the edit buffer and
jpayne@68 516 the edit buffer is not empty.
jpayne@68 517 .TP
jpayne@68 518 \fBem-delete-prev-char Pq emacs: Ctrl-H, BS, Ctrl-?, DEL\fP
jpayne@68 519 Delete the character to the left of the cursor.
jpayne@68 520 It is an error if the cursor is at the beginning of the edit buffer.
jpayne@68 521 .TP
jpayne@68 522 \fBem-exchange-mark Pq not bound by default\fP
jpayne@68 523 Exchange the cursor and the mark.
jpayne@68 524 .TP
jpayne@68 525 \fBem-gosmacs-transpose Pq not bound by default\fP
jpayne@68 526 Exchange the two characters to the left of the cursor.
jpayne@68 527 It is an error if the cursor is on the first or second character
jpayne@68 528 of the edit buffer.
jpayne@68 529 .TP
jpayne@68 530 \fBem-inc-search-next Pq not bound by default\fP
jpayne@68 531 Emacs incremental next search.
jpayne@68 532 .TP
jpayne@68 533 \fBem-inc-search-prev Pq not bound by default\fP
jpayne@68 534 Emacs incremental reverse search.
jpayne@68 535 .TP
jpayne@68 536 \fBem-kill-line Pq not bound by default\fP
jpayne@68 537 Delete the entire contents of the edit buffer and save it to the
jpayne@68 538 cut buffer.
jpayne@68 539 .TP
jpayne@68 540 \fBem-kill-region Pq emacs: Ctrl-W\fP
jpayne@68 541 Delete the string from the cursor to the mark and save it to the
jpayne@68 542 cut buffer.
jpayne@68 543 It is an error if the mark is not set.
jpayne@68 544 .TP
jpayne@68 545 \fBem-lower-case Pq emacs: Meta-L, Meta-l\fP
jpayne@68 546 Convert the characters from the cursor to the end of the current
jpayne@68 547 word to lower case.
jpayne@68 548 .TP
jpayne@68 549 \fBem-meta-next Pq vi command, emacs: Ctrl-[, ESC\fP
jpayne@68 550 Set the bit 0x80 on the next character typed.
jpayne@68 551 Unless the resulting code point is printable, holding down the
jpayne@68 552 `Meta-'
jpayne@68 553 key while typing that character is a simpler way to achieve the
jpayne@68 554 same effect.
jpayne@68 555 .TP
jpayne@68 556 \fBem-next-word Pq Meta-F, Meta-f\fP
jpayne@68 557 Move the cursor to the end of the current word.
jpayne@68 558 Can be used as a movement command after
jpayne@68 559 \fBvi_change_meta\fP,
jpayne@68 560 \fBvi_delete_meta\fP,
jpayne@68 561 or
jpayne@68 562 \fBvi_yank\fP.
jpayne@68 563 It is an error if the cursor is already at the end of the edit
jpayne@68 564 buffer.
jpayne@68 565 .TP
jpayne@68 566 \fBem-set-mark Pq emacs: Ctrl-Q, NUL\fP
jpayne@68 567 Set the mark at the current cursor position.
jpayne@68 568 .TP
jpayne@68 569 \fBem-toggle-overwrite Pq insert\fP
jpayne@68 570 Switch from insert to overwrite mode or vice versa.
jpayne@68 571 .TP
jpayne@68 572 \fBem-universal-argument Pq not bound by default\fP
jpayne@68 573 If in argument input mode, multiply the argument by 4.
jpayne@68 574 Otherwise, switch to argument input mode and set the argument to 4.
jpayne@68 575 It is an error if the existing argument is already greater than a
jpayne@68 576 million.
jpayne@68 577 .TP
jpayne@68 578 \fBem-upper-case Pq emacs: Meta-U, Meta-u\fP
jpayne@68 579 Convert the characters from the cursor to the end of the current
jpayne@68 580 word to upper case.
jpayne@68 581 .TP
jpayne@68 582 \fBem-yank Pq emacs: Ctrl-Y\fP
jpayne@68 583 Paste the cut buffer to the left of the cursor.
jpayne@68 584 .TP
jpayne@68 585 \fBvi-add Pq vi command: a\fP
jpayne@68 586 Switch to vi insert mode.
jpayne@68 587 Unless the cursor is already at the end of the edit buffer, move
jpayne@68 588 it one character position to the right.
jpayne@68 589 .TP
jpayne@68 590 \fBvi-add-at-eol Pq vi command: A\fP
jpayne@68 591 Switch to vi insert mode and move the cursor to the end of the edit
jpayne@68 592 buffer.
jpayne@68 593 .TP
jpayne@68 594 \fBvi-alias Pq vi command: @\fP
jpayne@68 595 If an alias function was defined by calling the
jpayne@68 596 \fBel_set\fP(3)
jpayne@68 597 or
jpayne@68 598 \fBel_wset\fP(3)
jpayne@68 599 function with the argument
jpayne@68 600 EL_ALIAS_TEXT ,
jpayne@68 601 read one character from the terminal bypassing the normal line
jpayne@68 602 editing functionality, call the alias function passing the argument that was specified with
jpayne@68 603 EL_ALIAS_TEXT
jpayne@68 604 as the first argument and the character read, with an underscore
jpayne@68 605 prepended, as the second argument, and pass the string returned
jpayne@68 606 from the alias function to
jpayne@68 607 \fBel_wpush\fP(3).
jpayne@68 608 It is an error if no alias function is defined or if trying to read
jpayne@68 609 the character results in end of file or an error.
jpayne@68 610 .TP
jpayne@68 611 \fBvi-change-case Pq vi command: ~\fP
jpayne@68 612 Change the case of the character at the cursor and move the cursor
jpayne@68 613 one character position to the right.
jpayne@68 614 It is an error if the cursor is already at the end of the edit
jpayne@68 615 buffer.
jpayne@68 616 .TP
jpayne@68 617 \fBvi-change-meta Pq vi command: c\fP
jpayne@68 618 Delete the string from the cursor to the position specified by the
jpayne@68 619 following movement command and save a copy of it to the cut buffer.
jpayne@68 620 When given twice in a row, instead delete the whole contents of the
jpayne@68 621 edit buffer and save a copy of it to the cut buffer.
jpayne@68 622 In either case, switch to vi insert mode after that.
jpayne@68 623 .TP
jpayne@68 624 \fBvi-change-to-eol Pq vi command: C\fP
jpayne@68 625 Delete the string from the cursor position to the end of the line
jpayne@68 626 and save it to the cut buffer, then switch to vi insert mode.
jpayne@68 627 .TP
jpayne@68 628 \fBvi-command-mode Pq vi insert: Ctrl-[, ESC\fP
jpayne@68 629 Discard pending actions and arguments and switch to vi command mode.
jpayne@68 630 Unless the cursor is already at the beginning of the edit buffer,
jpayne@68 631 move it to the left by one character position.
jpayne@68 632 .TP
jpayne@68 633 \fBvi-comment-out Pq vi command: #\fP
jpayne@68 634 Insert a
jpayne@68 635 `#'
jpayne@68 636 character at the beginning of the edit buffer and return the edit
jpayne@68 637 buffer to the program.
jpayne@68 638 .TP
jpayne@68 639 \fBvi-delete-meta Pq vi command: d\fP
jpayne@68 640 Delete the string from the cursor to the position specified by the
jpayne@68 641 following movement command and save a copy of it to the cut buffer.
jpayne@68 642 When given twice in a row, instead delete the whole contents of the
jpayne@68 643 edit buffer and save a copy of it to the cut buffer.
jpayne@68 644 .TP
jpayne@68 645 \fBvi-delete-prev-char Pq vi insert: Ctrl-H, BS, Ctrl-?, DEL\fP
jpayne@68 646 Delete the character to the left of the cursor.
jpayne@68 647 It is an error if the cursor is already at the beginning of the
jpayne@68 648 edit buffer.
jpayne@68 649 .TP
jpayne@68 650 \fBvi-end-big-word Pq vi command: E\fP
jpayne@68 651 Move the cursor to the end of the current space delimited word.
jpayne@68 652 Can be used as a movement command after
jpayne@68 653 \fBvi_change_meta\fP,
jpayne@68 654 \fBvi_delete_meta\fP,
jpayne@68 655 or
jpayne@68 656 \fBvi_yank\fP.
jpayne@68 657 It is an error if the cursor is already at the end of the edit
jpayne@68 658 buffer.
jpayne@68 659 .TP
jpayne@68 660 \fBvi-end-word Pq vi command: e\fP
jpayne@68 661 Move the cursor to the end of the current word.
jpayne@68 662 Can be used as a movement command after
jpayne@68 663 \fBvi_change_meta\fP,
jpayne@68 664 \fBvi_delete_meta\fP,
jpayne@68 665 or
jpayne@68 666 \fBvi_yank\fP.
jpayne@68 667 It is an error if the cursor is already at the end of the edit
jpayne@68 668 buffer.
jpayne@68 669 .TP
jpayne@68 670 \fBvi-history-word Pq vi command: _\fP
jpayne@68 671 Insert the first word from the most recent history entry after the
jpayne@68 672 cursor, move the cursor after to the character after the inserted
jpayne@68 673 word, and switch to vi insert mode.
jpayne@68 674 It is an error if there is no history entry or the most recent
jpayne@68 675 history entry is empty.
jpayne@68 676 .TP
jpayne@68 677 \fBvi-insert Pq vi command: i\fP
jpayne@68 678 Enter insert mode.
jpayne@68 679 .TP
jpayne@68 680 \fBvi-insert-at-bol Pq vi command: I\fP
jpayne@68 681 Move the cursor to the beginning of the edit buffer and switch to
jpayne@68 682 vi insert mode.
jpayne@68 683 .TP
jpayne@68 684 \fBvi-kill-line-prev Pq vi: Ctrl-U\fP
jpayne@68 685 Delete the string from the beginning of the edit buffer to the
jpayne@68 686 cursor and save it to the cut buffer.
jpayne@68 687 .TP
jpayne@68 688 \fBvi-list-or-eof Pq vi insert: Ctrl-D, EOF\fP
jpayne@68 689 If the edit buffer is empty, indicate end of file to the program.
jpayne@68 690 It is an error if the edit buffer is not empty.
jpayne@68 691 .TP
jpayne@68 692 \fBvi-match Pq vi command: %\fP
jpayne@68 693 Consider opening and closing parentheses, braces, and brackets as
jpayne@68 694 delimiters.
jpayne@68 695 If the cursor is not at a delimiter, move it to the right until it
jpayne@68 696 gets to one, then move it to the matching delimiter.
jpayne@68 697 Can be used as a movement command after
jpayne@68 698 \fBvi_change_meta\fP,
jpayne@68 699 \fBvi_delete_meta\fP,
jpayne@68 700 or
jpayne@68 701 \fBvi_yank\fP.
jpayne@68 702 It is an error if there is no delimiter at the cursor or in the
jpayne@68 703 string to the right of the cursor, or if the first such delimiter
jpayne@68 704 has no matching delimiter.
jpayne@68 705 .TP
jpayne@68 706 \fBvi-next-big-word Pq vi command: W\fP
jpayne@68 707 Move the cursor to the right to the beginning of the next space
jpayne@68 708 delimited word.
jpayne@68 709 Can be used as a movement command after
jpayne@68 710 \fBvi_change_meta\fP,
jpayne@68 711 \fBvi_delete_meta\fP,
jpayne@68 712 or
jpayne@68 713 \fBvi_yank\fP.
jpayne@68 714 It is an error if the cursor is already at the end of the edit
jpayne@68 715 buffer or on its last character.
jpayne@68 716 .TP
jpayne@68 717 \fBvi-next-char Pq vi command: f\fP
jpayne@68 718 Read one character from the terminal bypassing the normal line
jpayne@68 719 editing functionality and move the cursor to the right to the next
jpayne@68 720 instance of that character in the edit buffer.
jpayne@68 721 Can be used as a movement command after
jpayne@68 722 \fBvi_change_meta\fP,
jpayne@68 723 \fBvi_delete_meta\fP,
jpayne@68 724 or
jpayne@68 725 \fBvi_yank\fP.
jpayne@68 726 If trying to read the character results in end of file or an error,
jpayne@68 727 call
jpayne@68 728 \fBed-end-of-file\fP
jpayne@68 729 instead.
jpayne@68 730 It is an error if the character is not found searching to the right
jpayne@68 731 in the edit buffer.
jpayne@68 732 .TP
jpayne@68 733 \fBvi-next-word Pq vi command: w\fP
jpayne@68 734 Move the cursor to the right to the beginning of the next word.
jpayne@68 735 Can be used as a movement command after
jpayne@68 736 \fBvi_change_meta\fP,
jpayne@68 737 \fBvi_delete_meta\fP,
jpayne@68 738 or
jpayne@68 739 \fBvi_yank\fP.
jpayne@68 740 It is an error if the cursor is already at the end of the edit
jpayne@68 741 buffer or on its last character.
jpayne@68 742 .TP
jpayne@68 743 \fBvi-paste-next Pq vi command: p\fP
jpayne@68 744 Insert a copy of the cut buffer to the right of the cursor.
jpayne@68 745 It is an error if the cut buffer is empty.
jpayne@68 746 .TP
jpayne@68 747 \fBvi-paste-prev Pq vi command: P\fP
jpayne@68 748 Insert a copy of the cut buffer to the left of the cursor.
jpayne@68 749 It is an error if the cut buffer is empty.
jpayne@68 750 .TP
jpayne@68 751 \fBvi-prev-big-word Pq vi command: B\fP
jpayne@68 752 Move the cursor to the left to the next beginning of a space delimited
jpayne@68 753 word.
jpayne@68 754 Can be used as a movement command after
jpayne@68 755 \fBvi_change_meta\fP,
jpayne@68 756 \fBvi_delete_meta\fP,
jpayne@68 757 or
jpayne@68 758 \fBvi_yank\fP.
jpayne@68 759 It is an error if the cursor is already at the beginning of the
jpayne@68 760 edit buffer.
jpayne@68 761 .TP
jpayne@68 762 \fBvi-prev-char Pq vi command: F\fP
jpayne@68 763 Read one character from the terminal bypassing the normal line
jpayne@68 764 editing functionality and move the cursor to the left to the next
jpayne@68 765 instance of that character in the edit buffer.
jpayne@68 766 Can be used as a movement command after
jpayne@68 767 \fBvi_change_meta\fP,
jpayne@68 768 \fBvi_delete_meta\fP,
jpayne@68 769 or
jpayne@68 770 \fBvi_yank\fP.
jpayne@68 771 If trying to read the character results in end of file or an error,
jpayne@68 772 call
jpayne@68 773 \fBed-end-of-file\fP
jpayne@68 774 instead.
jpayne@68 775 It is an error if the character is not found searching to the left
jpayne@68 776 in the edit buffer.
jpayne@68 777 .TP
jpayne@68 778 \fBvi-prev-word Pq vi command: b\fP
jpayne@68 779 Move the cursor to the left to the next beginning of a word.
jpayne@68 780 Can be used as a movement command after
jpayne@68 781 \fBvi_change_meta\fP,
jpayne@68 782 \fBvi_delete_meta\fP,
jpayne@68 783 or
jpayne@68 784 \fBvi_yank\fP.
jpayne@68 785 It is an error if the cursor is already at the beginning of the
jpayne@68 786 edit buffer.
jpayne@68 787 .TP
jpayne@68 788 \fBvi-redo Pq vi command: Sq \&.\fP
jpayne@68 789 Redo the last non-motion command.
jpayne@68 790 .TP
jpayne@68 791 \fBvi-repeat-next-char Pq vi command: Sq \&;\fP
jpayne@68 792 Repeat the most recent character search in the same search direction.
jpayne@68 793 Can be used as a movement command after
jpayne@68 794 \fBvi_change_meta\fP,
jpayne@68 795 \fBvi_delete_meta\fP,
jpayne@68 796 or
jpayne@68 797 \fBvi_yank\fP.
jpayne@68 798 .TP
jpayne@68 799 \fBvi-repeat-prev-char Pq vi command: Sq \&,\fP
jpayne@68 800 Repeat the most recent character search in the opposite search
jpayne@68 801 direction.
jpayne@68 802 Can be used as a movement command after
jpayne@68 803 \fBvi_change_meta\fP,
jpayne@68 804 \fBvi_delete_meta\fP,
jpayne@68 805 or
jpayne@68 806 \fBvi_yank\fP.
jpayne@68 807 .TP
jpayne@68 808 \fBvi-repeat-search-next Pq vi command: n\fP
jpayne@68 809 Repeat the most recent history search in the same search direction.
jpayne@68 810 .TP
jpayne@68 811 \fBvi-repeat-search-prev Pq vi command: N\fP
jpayne@68 812 Repeat the most recent history search in the opposite search
jpayne@68 813 direction.
jpayne@68 814 .TP
jpayne@68 815 \fBvi-replace-char Pq vi command: r\fP
jpayne@68 816 Switch to vi replace mode, and automatically switch back to vi
jpayne@68 817 command mode after the next character typed.
jpayne@68 818 See
jpayne@68 819 \fBed-insert\fP
jpayne@68 820 for a description of replace mode.
jpayne@68 821 It is an error if the cursor is at the end of the edit buffer.
jpayne@68 822 .TP
jpayne@68 823 \fBvi-replace-mode Pq vi command: R\fP
jpayne@68 824 Switch to vi replace mode.
jpayne@68 825 This is a variant of vi insert mode; see
jpayne@68 826 \fBed-insert\fP
jpayne@68 827 for the difference.
jpayne@68 828 .TP
jpayne@68 829 \fBvi-search-next Pq vi command: \&?\fP
jpayne@68 830 Replace the edit buffer with the next matching history entry.
jpayne@68 831 .TP
jpayne@68 832 \fBvi-search-prev Pq vi command: /\fP
jpayne@68 833 Replace the edit buffer with the previous matching history entry.
jpayne@68 834 .TP
jpayne@68 835 \fBvi-substitute-char Pq vi command: s\fP
jpayne@68 836 Delete the character at the cursor and switch to vi insert mode.
jpayne@68 837 .TP
jpayne@68 838 \fBvi-substitute-line Pq vi command: S\fP
jpayne@68 839 Delete the entire contents of the edit buffer, save a copy of it
jpayne@68 840 in the cut buffer, and enter vi insert mode.
jpayne@68 841 .TP
jpayne@68 842 \fBvi-to-column Pq vi command: \&|\fP
jpayne@68 843 Move the cursor to the column specified as the argument.
jpayne@68 844 Can be used as a movement command after
jpayne@68 845 \fBvi_change_meta\fP,
jpayne@68 846 \fBvi_delete_meta\fP,
jpayne@68 847 or
jpayne@68 848 \fBvi_yank\fP.
jpayne@68 849 .TP
jpayne@68 850 \fBvi-to-history-line Pq vi command: G\fP
jpayne@68 851 Replace the edit buffer with the specified history entry.
jpayne@68 852 .TP
jpayne@68 853 \fBvi-to-next-char Pq vi command: t\fP
jpayne@68 854 Read one character from the terminal bypassing the normal line
jpayne@68 855 editing functionality and move the cursor to the right to the
jpayne@68 856 character before the next instance of that character in the edit
jpayne@68 857 buffer.
jpayne@68 858 Can be used as a movement command after
jpayne@68 859 \fBvi_change_meta\fP,
jpayne@68 860 \fBvi_delete_meta\fP,
jpayne@68 861 or
jpayne@68 862 \fBvi_yank\fP.
jpayne@68 863 If trying to read the character results in end of file or an error,
jpayne@68 864 call
jpayne@68 865 \fBed-end-of-file\fP
jpayne@68 866 instead.
jpayne@68 867 It is an error if the character is not found searching to the right
jpayne@68 868 in the edit buffer.
jpayne@68 869 .TP
jpayne@68 870 \fBvi-to-prev-char Pq vi command: T\fP
jpayne@68 871 Read one character from the terminal bypassing the normal line
jpayne@68 872 editing functionality and move the cursor to the left to the character
jpayne@68 873 after the next instance of that character in the edit buffer.
jpayne@68 874 Can be used as a movement command after
jpayne@68 875 \fBvi_change_meta\fP,
jpayne@68 876 \fBvi_delete_meta\fP,
jpayne@68 877 or
jpayne@68 878 \fBvi_yank\fP.
jpayne@68 879 If trying to read the character results in end of file or an error,
jpayne@68 880 call
jpayne@68 881 \fBed-end-of-file\fP
jpayne@68 882 instead.
jpayne@68 883 It is an error if the character is not found searching to the left
jpayne@68 884 in the edit buffer.
jpayne@68 885 .TP
jpayne@68 886 \fBvi-undo Pq vi command: u\fP
jpayne@68 887 Undo the last change.
jpayne@68 888 .TP
jpayne@68 889 \fBvi-undo-line Pq vi command: U\fP
jpayne@68 890 Undo all changes to the edit buffer.
jpayne@68 891 .TP
jpayne@68 892 \fBvi-yank Pq vi command: y\fP
jpayne@68 893 Copy the string from the cursor to the position specified by the
jpayne@68 894 following movement command to the cut buffer.
jpayne@68 895 When given twice in a row, instead copy the whole contents of the
jpayne@68 896 edit buffer to the cut buffer.
jpayne@68 897 .TP
jpayne@68 898 \fBvi-yank-end Pq vi command: Y\fP
jpayne@68 899 Copy the string from the cursor to the end of the edit buffer to
jpayne@68 900 the cut buffer.
jpayne@68 901 .TP
jpayne@68 902 \fBvi-zero Pq vi command: 0\fP
jpayne@68 903 If in argument input mode, multiply the argument by ten.
jpayne@68 904 Otherwise, move the cursor to the beginning of the edit buffer.
jpayne@68 905 Can be used as a movement command after
jpayne@68 906 \fBvi_change_meta\fP,
jpayne@68 907 \fBvi_delete_meta\fP,
jpayne@68 908 or
jpayne@68 909 \fBvi_yank\fP.
jpayne@68 910 .SS Macros
jpayne@68 911 If an input character is bound to the editor command
jpayne@68 912 \fBed-sequence-lead-in\fP,
jpayne@68 913 \fBeditline\fP
jpayne@68 914 attempts to call a macro.
jpayne@68 915 If the input character by itself forms the name of a macro, that
jpayne@68 916 macro is executed.
jpayne@68 917 Otherwise, additional input characters are read until the string
jpayne@68 918 read forms the name of a macro, in which case that macro is executed,
jpayne@68 919 or until the string read matches the beginning of none of the existing
jpayne@68 920 macro names, in which case the string including the final, mismatching
jpayne@68 921 character is discarded and the terminal bell is rung.
jpayne@68 922
jpayne@68 923 There are two kinds of macros.
jpayne@68 924 Command macros execute a single editor command.
jpayne@68 925 Keyboard macros return a string of characters that is appended
jpayne@68 926 as a new line to the
jpayne@68 927 .B Input Queue .
jpayne@68 928
jpayne@68 929 The following command macros are defined by default in vi command
jpayne@68 930 mode and in emacs mode:
jpayne@68 931 It Esc \&[ A, Esc O A Ta \fBed-prev-history\fP
jpayne@68 932 It Esc \&[ B, Esc O B Ta \fBed-next-history\fP
jpayne@68 933 It Esc \&[ C, Esc O C Ta \fBed-next-char\fP
jpayne@68 934 It Esc \&[ D, Esc O D Ta \fBed-prev-char\fP
jpayne@68 935 It Esc \&[ F, Esc O F Ta \fBed-move-to-end\fP
jpayne@68 936 It Esc \&[ H, Esc O H Ta \fBed-move-to-beg\fP
jpayne@68 937
jpayne@68 938 In vi command mode, they are also defined by default without the
jpayne@68 939 initial escape character.
jpayne@68 940
jpayne@68 941 In addition, the
jpayne@68 942 \fBeditline\fP
jpayne@68 943 library tries to bind the strings generated by the arrow keys
jpayne@68 944 as reported by the
jpayne@68 945 \fBterminfo\fP(5)
jpayne@68 946 database to these editor commands, unless that would clobber
jpayne@68 947 user settings.
jpayne@68 948
jpayne@68 949 In emacs mode, the two-character string
jpayne@68 950 ``Ctrl-X Ctrl-X''
jpayne@68 951 is bound to the
jpayne@68 952 \fBem-exchange-mark\fP
jpayne@68 953 editor command.
jpayne@68 954 .SS Input Queue
jpayne@68 955 The
jpayne@68 956 \fBeditline\fP
jpayne@68 957 library maintains an input queue operated in FIFO mode.
jpayne@68 958 Whenever it needs an input character, it takes the first character
jpayne@68 959 from the first line of the input queue.
jpayne@68 960 When the queue is empty, it reads from the terminal.
jpayne@68 961
jpayne@68 962 A line can be appended to the end of the input queue in several ways:
jpayne@68 963 It
jpayne@68 964 By calling one of the keyboard
jpayne@68 965 .B Macros .
jpayne@68 966 It
jpayne@68 967 By calling the editor command
jpayne@68 968 \fBvi-redo\fP.
jpayne@68 969 It
jpayne@68 970 By calling the editor command
jpayne@68 971 \fBvi-alias\fP.
jpayne@68 972 It
jpayne@68 973 By pressing a key in emacs incremental search mode that doesn't
jpayne@68 974 have a special meaning in that mode but returns to normal emacs
jpayne@68 975 mode.
jpayne@68 976 It
jpayne@68 977 If an application program directly calls the functions
jpayne@68 978 \fBel_push\fP(3)
jpayne@68 979 or
jpayne@68 980 \fBel_wpush\fP(3),
jpayne@68 981 it can provide additional, program-specific ways
jpayne@68 982 of appending to the input queue.
jpayne@68 983 .SH SEE ALSO
jpayne@68 984 \fBmg\fP(1),
jpayne@68 985 \fBvi\fP(1),
jpayne@68 986 \fBeditline\fP(3),
jpayne@68 987 \fBel_wgets\fP(3),
jpayne@68 988 \fBel_wpush\fP(3),
jpayne@68 989 \fBel_wset\fP(3),
jpayne@68 990 \fBeditrc\fP(5)
jpayne@68 991 .SH HISTORY
jpayne@68 992 This manual page first appeared in
jpayne@68 993 Ox 6.0
jpayne@68 994 and
jpayne@68 995 Nx 8 .
jpayne@68 996 .SH AUTHORS
jpayne@68 997
jpayne@68 998 -nosplit
jpayne@68 999 This manual page was written by
jpayne@68 1000
jpayne@68 1001 Ingo Schwarze <Mt schwarze@openbsd.org .>