jpayne@68: .TH EDITLINE 7 "April 6, 2024" "" jpayne@68: .SH NAME jpayne@68: \fBeditline\fP jpayne@68: \- line editing user interface jpayne@68: .SH DESCRIPTION jpayne@68: When a program using the jpayne@68: \fBeditline\fP(3) jpayne@68: library prompts for an input string using the function jpayne@68: \fBel_wgets\fP(3), jpayne@68: it reads characters from the terminal. jpayne@68: Invalid input bytes that do not form characters are silently jpayne@68: discarded. jpayne@68: For each character read, one editor command is executed. jpayne@68: The mapping of input characters to editor commands depends on the jpayne@68: editing mode. jpayne@68: There are three editing modes: vi insert mode, vi command mode, jpayne@68: and emacs mode. jpayne@68: The default is vi insert mode. jpayne@68: The program can switch the default to emacs mode by using the jpayne@68: \fBel_set\fP(3) jpayne@68: or jpayne@68: \fBel_parse\fP(3) jpayne@68: functions, and the user can switch to emacs mode either in the jpayne@68: \fBeditrc\fP(5) jpayne@68: configuration file or interactively with the jpayne@68: \fBed-command\fP jpayne@68: editor command, in all three cases executing the jpayne@68: \fBbind Fl e\fP jpayne@68: builtin command. jpayne@68: jpayne@68: If trying to read from the terminal results in end of file or an jpayne@68: error, the library signals end of file to the program and does not jpayne@68: return a string. jpayne@68: .SS Input character bindings jpayne@68: All default bindings described below can be overridden by individual jpayne@68: programs and can be changed with the jpayne@68: \fBeditrc\fP(5) jpayne@68: \fBbind\fP jpayne@68: builtin command. jpayne@68: jpayne@68: In the following tables, jpayne@68: `Ctrl-' jpayne@68: indicates a character with the bit 0x40 flipped, and jpayne@68: `Meta-' jpayne@68: indicates a character with the bit 0x80 set. jpayne@68: In vi insert mode and in emacs mode, all Meta-characters considered jpayne@68: printable by the current jpayne@68: \fBlocale\fP(1) jpayne@68: are bound to jpayne@68: \fBed-insert\fP jpayne@68: instead of to the editor command listed below. jpayne@68: Consequently, in UTF-8 mode, most of the Meta-characters are not jpayne@68: directly accessible because their code points are occupied by jpayne@68: printable Unicode characters, and Meta-characters are usually input jpayne@68: using the jpayne@68: \fBem-meta-next\fP jpayne@68: editor command. jpayne@68: For example, to enter jpayne@68: `Meta-B' jpayne@68: in order to call the jpayne@68: \fBed-prev-word\fP jpayne@68: editor command in emacs mode, call jpayne@68: \fBem-meta-next\fP jpayne@68: by pressing and releasing the escape key (or equivalently, Ctrl-[), jpayne@68: then press and release the jpayne@68: `B' jpayne@68: key. jpayne@68: If you have configured a Meta-key on your keyboard, for example jpayne@68: with jpayne@68: `setxkbmap' -option altwin:left_meta_win , jpayne@68: the Ctrl-Meta-characters are directly accessible. jpayne@68: For example, to enter jpayne@68: `Ctrl-Meta-H' jpayne@68: in order to call the jpayne@68: \fBed-delete-prev-word\fP jpayne@68: editor command in emacs mode, hold down the keys jpayne@68: `Ctrl', jpayne@68: `Meta', jpayne@68: and jpayne@68: `H' jpayne@68: at the same time. jpayne@68: Alternatively, press and release the escape key, then press and jpayne@68: release jpayne@68: `Ctrl-H'. jpayne@68: jpayne@68: In vi input mode, input characters are bound to the following editor jpayne@68: commands by default: jpayne@68: It Ctrl-D, EOF Ta \fBvi-list-or-eof\fP jpayne@68: It Ctrl-H, BS Ta \fBvi-delete-prev-char\fP jpayne@68: It Ctrl-J, LF Ta \fBed-newline\fP jpayne@68: It Ctrl-M, CR Ta \fBed-newline\fP jpayne@68: It Ctrl-Q Ta \fBed-tty-start-output\fP jpayne@68: It Ctrl-S Ta \fBed-tty-stop-output\fP jpayne@68: It Ctrl-U Ta \fBvi-kill-line-prev\fP jpayne@68: It Ctrl-V Ta \fBed-quoted-insert\fP jpayne@68: It Ctrl-W Ta \fBed-delete-prev-word\fP jpayne@68: It Ctrl-[, ESC Ta \fBvi-command-mode\fP jpayne@68: It Ctrl-\e, QUIT Ta \fBed-tty-sigquit\fP jpayne@68: It Ctrl-?, DEL Ta \fBvi-delete-prev-char\fP jpayne@68: jpayne@68: All other input characters except the NUL character (Ctrl-@) are jpayne@68: bound to jpayne@68: \fBed-insert\fP. jpayne@68: jpayne@68: In vi command mode, input characters are bound to the following jpayne@68: editor commands by default: jpayne@68: It Ctrl-A Ta \fBed-move-to-beg\fP jpayne@68: It Ctrl-C, INT Ta \fBed-tty-sigint\fP jpayne@68: It Ctrl-E Ta \fBed-move-to-end\fP jpayne@68: It Ctrl-H, BS Ta \fBed-delete-prev-char\fP jpayne@68: It Ctrl-J, LF Ta \fBed-newline\fP jpayne@68: It Ctrl-K Ta \fBed-kill-line\fP jpayne@68: It Ctrl-L, FF Ta \fBed-clear-screen\fP jpayne@68: It Ctrl-M, CR Ta \fBed-newline\fP jpayne@68: It Ctrl-N Ta \fBed-next-history\fP jpayne@68: It Ctrl-O Ta \fBed-tty-flush-output\fP jpayne@68: It Ctrl-P Ta \fBed-prev-history\fP jpayne@68: It Ctrl-Q Ta \fBed-tty-start-output\fP jpayne@68: It Ctrl-R Ta \fBed-redisplay\fP jpayne@68: It Ctrl-S Ta \fBed-tty-stop-output\fP jpayne@68: It Ctrl-U Ta \fBvi-kill-line-prev\fP jpayne@68: It Ctrl-W Ta \fBed-delete-prev-word\fP jpayne@68: It Ctrl-[, ESC Ta \fBem-meta-next\fP jpayne@68: It Ctrl-\e, QUIT Ta \fBed-tty-sigquit\fP jpayne@68: It Space Ta \fBed-next-char\fP jpayne@68: It # Ta \fBvi-comment-out\fP jpayne@68: It $ Ta \fBed-move-to-end\fP jpayne@68: It % Ta \fBvi-match\fP jpayne@68: It + Ta \fBed-next-history\fP jpayne@68: It \&, Ta \fBvi-repeat-prev-char\fP jpayne@68: It - Ta \fBed-prev-history\fP jpayne@68: It \&. Ta \fBvi-redo\fP jpayne@68: It / Ta \fBvi-search-prev\fP jpayne@68: It 0 Ta \fBvi-zero\fP jpayne@68: It 1 to 9 Ta \fBed-argument-digit\fP jpayne@68: It \&: Ta \fBed-command\fP jpayne@68: It \&; Ta \fBvi-repeat-next-char\fP jpayne@68: It \&? Ta \fBvi-search-next\fP jpayne@68: It @ Ta \fBvi-alias\fP jpayne@68: It A Ta \fBvi-add-at-eol\fP jpayne@68: It B Ta \fBvi-prev-big-word\fP jpayne@68: It C Ta \fBvi-change-to-eol\fP jpayne@68: It D Ta \fBed-kill-line\fP jpayne@68: It E Ta \fBvi-end-big-word\fP jpayne@68: It F Ta \fBvi-prev-char\fP jpayne@68: It G Ta \fBvi-to-history-line\fP jpayne@68: It I Ta \fBvi-insert-at-bol\fP jpayne@68: It J Ta \fBed-search-next-history\fP jpayne@68: It K Ta \fBed-search-prev-history\fP jpayne@68: It N Ta \fBvi-repeat-search-prev\fP jpayne@68: It O Ta \fBed-sequence-lead-in\fP jpayne@68: It P Ta \fBvi-paste-prev\fP jpayne@68: It R Ta \fBvi-replace-mode\fP jpayne@68: It S Ta \fBvi-substitute-line\fP jpayne@68: It T Ta \fBvi-to-prev-char\fP jpayne@68: It U Ta \fBvi-undo-line\fP jpayne@68: It W Ta \fBvi-next-big-word\fP jpayne@68: It X Ta \fBed-delete-prev-char\fP jpayne@68: It Y Ta \fBvi-yank-end\fP jpayne@68: It \&[ Ta \fBed-sequence-lead-in\fP jpayne@68: It ^ Ta \fBed-move-to-beg\fP jpayne@68: It _ Ta \fBvi-history-word\fP jpayne@68: It a Ta \fBvi-add\fP jpayne@68: It b Ta \fBvi-prev-word\fP jpayne@68: It c Ta \fBvi-change-meta\fP jpayne@68: It d Ta \fBvi-delete-meta\fP jpayne@68: It e Ta \fBvi-end-word\fP jpayne@68: It f Ta \fBvi-next-char\fP jpayne@68: It h Ta \fBed-prev-char\fP jpayne@68: It i Ta \fBvi-insert\fP jpayne@68: It j Ta \fBed-next-history\fP jpayne@68: It k Ta \fBed-prev-history\fP jpayne@68: It l Ta \fBed-next-char\fP jpayne@68: It n Ta \fBvi-repeat-search-next\fP jpayne@68: It p Ta \fBvi-paste-next\fP jpayne@68: It r Ta \fBvi-replace-char\fP jpayne@68: It s Ta \fBvi-substitute-char\fP jpayne@68: It t Ta \fBvi-to-next-char\fP jpayne@68: It u Ta \fBvi-undo\fP jpayne@68: It v Ta \fBvi-histedit\fP jpayne@68: It w Ta \fBvi-next-word\fP jpayne@68: It x Ta \fBed-delete-next-char\fP jpayne@68: It y Ta \fBvi-yank\fP jpayne@68: It \&| Ta \fBvi-to-column\fP jpayne@68: It ~ Ta \fBvi-change-case\fP jpayne@68: It Ctrl-?, DEL Ta \fBed-delete-prev-char\fP jpayne@68: It Meta-O Ta \fBed-sequence-lead-in\fP jpayne@68: It Meta-[ Ta \fBed-sequence-lead-in\fP jpayne@68: jpayne@68: In emacs mode, input characters are bound to the following editor jpayne@68: commands by default: jpayne@68: It 0 to 9 Ta \fBed-digit\fP jpayne@68: It Ctrl-@, NUL Ta \fBem-set-mark\fP jpayne@68: It Ctrl-A Ta \fBed-move-to-beg\fP jpayne@68: It Ctrl-B Ta \fBed-prev-char\fP jpayne@68: It Ctrl-C, INT Ta \fBed-tty-sigint\fP jpayne@68: It Ctrl-D, EOF Ta \fBem-delete-or-list\fP jpayne@68: It Ctrl-E Ta \fBed-move-to-end\fP jpayne@68: It Ctrl-F Ta \fBed-next-char\fP jpayne@68: It Ctrl-H, BS Ta \fBem-delete-prev-char\fP jpayne@68: It Ctrl-J, LF Ta \fBed-newline\fP jpayne@68: It Ctrl-K Ta \fBed-kill-line\fP jpayne@68: It Ctrl-L, FF Ta \fBed-clear-screen\fP jpayne@68: It Ctrl-M, CR Ta \fBed-newline\fP jpayne@68: It Ctrl-N Ta \fBed-next-history\fP jpayne@68: It Ctrl-O Ta \fBed-tty-flush-output\fP jpayne@68: It Ctrl-P Ta \fBed-prev-history\fP jpayne@68: It Ctrl-Q Ta \fBed-tty-start-output\fP jpayne@68: It Ctrl-R Ta \fBed-redisplay\fP jpayne@68: It Ctrl-S Ta \fBed-tty-stop-output\fP jpayne@68: It Ctrl-T Ta \fBed-transpose-chars\fP jpayne@68: It Ctrl-U Ta \fBed-kill-line\fP jpayne@68: It Ctrl-V Ta \fBed-quoted-insert\fP jpayne@68: It Ctrl-W Ta \fBem-kill-region\fP jpayne@68: It Ctrl-X Ta \fBed-sequence-lead-in\fP jpayne@68: It Ctrl-Y Ta \fBem-yank\fP jpayne@68: It Ctrl-Z, TSTP Ta \fBed-tty-sigtstp\fP jpayne@68: It Ctrl-[, ESC Ta \fBem-meta-next\fP jpayne@68: It Ctrl-\e, QUIT Ta \fBed-tty-sigquit\fP jpayne@68: It Ctrl-] Ta \fBed-tty-dsusp\fP jpayne@68: It Ctrl-?, DEL Ta \fBem-delete-prev-char\fP jpayne@68: It Ctrl-Meta-H Ta \fBed-delete-prev-word\fP jpayne@68: It Ctrl-Meta-L Ta \fBed-clear-screen\fP jpayne@68: It Ctrl-Meta-_ Ta \fBem-copy-prev-word\fP jpayne@68: It Meta-0 to 9 Ta \fBed-argument-digit\fP jpayne@68: It Meta-B Ta \fBed-prev-word\fP jpayne@68: It Meta-C Ta \fBem-capitol-case\fP jpayne@68: It Meta-D Ta \fBem-delete-next-word\fP jpayne@68: It Meta-F Ta \fBem-next-word\fP jpayne@68: It Meta-L Ta \fBem-lower-case\fP jpayne@68: It Meta-N Ta \fBed-search-next-history\fP jpayne@68: It Meta-O Ta \fBed-sequence-lead-in\fP jpayne@68: It Meta-P Ta \fBed-search-prev-history\fP jpayne@68: It Meta-U Ta \fBem-upper-case\fP jpayne@68: It Meta-W Ta \fBem-copy-region\fP jpayne@68: It Meta-X Ta \fBed-command\fP jpayne@68: It Meta-[ Ta \fBed-sequence-lead-in\fP jpayne@68: It Meta-b Ta \fBed-prev-word\fP jpayne@68: It Meta-c Ta \fBem-capitol-case\fP jpayne@68: It Meta-d Ta \fBem-delete-next-word\fP jpayne@68: It Meta-f Ta \fBem-next-word\fP jpayne@68: It Meta-l Ta \fBem-lower-case\fP jpayne@68: It Meta-n Ta \fBed-search-next-history\fP jpayne@68: It Meta-p Ta \fBed-search-prev-history\fP jpayne@68: It Meta-u Ta \fBem-upper-case\fP jpayne@68: It Meta-w Ta \fBem-copy-region\fP jpayne@68: It Meta-x Ta \fBed-command\fP jpayne@68: It Ctrl-Meta-? Ta \fBed-delete-prev-word\fP jpayne@68: jpayne@68: The remaining jpayne@68: \fBascii\fP(7) jpayne@68: characters in the range 0x20 to 0x7e are bound to jpayne@68: \fBed-insert\fP. jpayne@68: jpayne@68: If standard output is not connected to a terminal device jpayne@68: or jpayne@68: \fBel_set\fP(3) jpayne@68: was used to set jpayne@68: EL_EDITMODE jpayne@68: to 0, all input character bindings are disabled and all characters jpayne@68: typed are appended to the edit buffer. jpayne@68: In that case, the edit buffer is returned to the program after a jpayne@68: newline or carriage return character is typed, or after the first jpayne@68: character typed if jpayne@68: \fBel_set\fP(3) jpayne@68: was used to set jpayne@68: EL_UNBUFFERED jpayne@68: to non-zero. jpayne@68: .SS Editor commands jpayne@68: Most editor commands accept an optional argument. jpayne@68: The argument is entered by prefixing the editor command with one jpayne@68: or more of the editor commands jpayne@68: \fBed-argument-digit\fP, jpayne@68: \fBed-digit\fP, jpayne@68: \fBem-universal-argument\fP, jpayne@68: or jpayne@68: \fBvi-zero\fP. jpayne@68: When an argument is not provided, it defaults to 1. jpayne@68: For most editor commands, the effect of an argument is to repeatedly jpayne@68: execute the command that number of times. jpayne@68: jpayne@68: When talking about a character string from a left character to a jpayne@68: right character, the left character is included in the string, while jpayne@68: the right character is not included. jpayne@68: jpayne@68: If an editor command causes an error, the input character is discarded, jpayne@68: no action occurs, and the terminal bell is rung. jpayne@68: In case of a non-fatal error, the terminal bell is also rung, jpayne@68: but the editor command takes effect anyway. jpayne@68: jpayne@68: In the following list, the default key bindings are listed after jpayne@68: each editor command. jpayne@68: .TP jpayne@68: \fBed-argument-digit Pq vi command: 1 to 9; emacs: Meta-0 to Meta-9\fP jpayne@68: If in argument input mode, append the input digit to the argument jpayne@68: being read. jpayne@68: Otherwise, switch to argument input mode and use the input digit jpayne@68: as the most significant digit of the argument. jpayne@68: It is an error if the input character is not a digit or if the jpayne@68: existing argument is already greater than a million. jpayne@68: .TP jpayne@68: \fBed-clear-screen Pq vi command: Ctrl-L; emacs: Ctrl-L, Ctrl-Meta-L\fP jpayne@68: Clear the screen and display the edit buffer at the top. jpayne@68: Ignore any argument. jpayne@68: .TP jpayne@68: \fBed-command Pq vi command: So \&: Sc ; emacs: Meta-X, Meta-x\fP jpayne@68: Read a line from the terminal bypassing the normal line editing jpayne@68: functionality and execute that line as an jpayne@68: \fBeditrc\fP(5) jpayne@68: builtin command. jpayne@68: If in vi command mode, also switch back to vi insert mode. jpayne@68: Ignore any argument. jpayne@68: .TP jpayne@68: \fBed-delete-next-char Pq vi command: x\fP jpayne@68: Delete the character at the cursor position. jpayne@68: With an argument, delete that number of characters. jpayne@68: In emacs mode, it is an error if the cursor is at the end of the jpayne@68: edit buffer. jpayne@68: In vi mode, the last character in the edit buffer is deleted in jpayne@68: that case, and it is an error if the buffer is empty. jpayne@68: .TP jpayne@68: \fBed-delete-prev-char Pq vi command: X, Ctrl-H, BS, Ctrl-?, DEL\fP jpayne@68: Delete the character to the left of the cursor position. jpayne@68: With an argument, delete that number of characters. jpayne@68: It is an error if the cursor is at the beginning of the edit buffer. jpayne@68: .TP jpayne@68: \fBed-delete-prev-word Pq vi: Ctrl-W; emacs: Ctrl-Meta-H, Ctrl-Meta-?\fP jpayne@68: Move to the left to the closest beginning of a word, delete the jpayne@68: string from that position to the cursor, and save it to the cut jpayne@68: buffer. jpayne@68: With an argument, delete that number of words. jpayne@68: It is an error if the cursor is at the beginning of the edit buffer. jpayne@68: .TP jpayne@68: \fBed-digit Pq emacs: 0 to 9\fP jpayne@68: If in argument input mode, append the input digit to the argument jpayne@68: being read. jpayne@68: Otherwise, call jpayne@68: \fBed-insert\fP. jpayne@68: It is an error if the input character is not a digit or if the jpayne@68: existing argument is already greater than a million. jpayne@68: .TP jpayne@68: \fBed-end-of-file Pq not bound by default\fP jpayne@68: Discard the edit buffer and indicate end of file to the program. jpayne@68: Ignore any argument. jpayne@68: .TP jpayne@68: \fBed-ignore Pq various\fP jpayne@68: Discard the input character and do nothing. jpayne@68: .TP jpayne@68: \fBed-insert Pq vi input: almost all; emacs: printable characters\fP jpayne@68: In insert mode, insert the input character left of the cursor jpayne@68: position. jpayne@68: In replace mode, overwrite the character at the cursor and move the jpayne@68: cursor to the right by one character position. jpayne@68: Accept an argument to do this repeatedly. jpayne@68: It is an error if the input character is the NUL character (Ctrl-@). jpayne@68: Failure to enlarge the edit buffer also results in an error. jpayne@68: .TP jpayne@68: \fBed-kill-line Pq vi command: D, Ctrl-K; emacs: Ctrl-K, Ctrl-U\fP jpayne@68: Delete the string from the cursor position to the end of the line jpayne@68: and save it to the cut buffer. jpayne@68: Ignore any argument. jpayne@68: .TP jpayne@68: \fBed-move-to-beg Pq vi command: ^, Ctrl-A; emacs: Ctrl-A\fP jpayne@68: In vi mode, move the cursor to the first non-space character in the jpayne@68: edit buffer. jpayne@68: In emacs mode, move the cursor to the beginning of the edit buffer. jpayne@68: Ignore any argument. jpayne@68: Can be used as a movement command after jpayne@68: \fBvi_change_meta\fP, jpayne@68: \fBvi_delete_meta\fP, jpayne@68: or jpayne@68: \fBvi_yank\fP. jpayne@68: .TP jpayne@68: \fBed-move-to-end Pq vi command: $, Ctrl-E; emacs: Ctrl-E\fP jpayne@68: Move the cursor to the end of the edit buffer. jpayne@68: Ignore any argument. jpayne@68: Can be used as a movement command after jpayne@68: \fBvi_change_meta\fP, jpayne@68: \fBvi_delete_meta\fP, jpayne@68: or jpayne@68: \fBvi_yank\fP. jpayne@68: .TP jpayne@68: \fBed-newline Pq all modes: Ctrl-J, LF, Ctrl-M, CR\fP jpayne@68: Append a newline character to the edit buffer and return the edit jpayne@68: buffer to the program. jpayne@68: Ignore any argument. jpayne@68: .TP jpayne@68: \fBed-next-char Pq vi command: Space, l; emacs: Ctrl-F\fP jpayne@68: Move the cursor one character position to the right. jpayne@68: With an argument, move by that number of characters. jpayne@68: Can be used as a movement command after jpayne@68: \fBvi_change_meta\fP, jpayne@68: \fBvi_delete_meta\fP, jpayne@68: or jpayne@68: \fBvi_yank\fP. jpayne@68: It is an error if the cursor is already at the end of the edit jpayne@68: buffer. jpayne@68: .TP jpayne@68: \fBed-next-history Pq vi command: j, +, Ctrl-N; emacs: Ctrl-N\fP jpayne@68: Replace the edit buffer with the next history line. jpayne@68: That line is older than the current line. jpayne@68: With an argument, go forward by that number of history lines. jpayne@68: It is a non-fatal error to advance by more lines than are available. jpayne@68: .TP jpayne@68: \fBed-next-line Pq not bound by default\fP jpayne@68: Move the cursor down one line. jpayne@68: With an argument, move down by that number of lines. jpayne@68: It is an error if the edit buffer does not contain enough newline jpayne@68: characters to the right of the cursor position. jpayne@68: .TP jpayne@68: \fBed-prev-char Pq vi command: h; emacs: Ctrl-B\fP jpayne@68: Move the cursor one character position to the left. jpayne@68: With an argument, move by that number of characters. jpayne@68: Can be used as a movement command after jpayne@68: \fBvi_change_meta\fP, jpayne@68: \fBvi_delete_meta\fP, jpayne@68: or jpayne@68: \fBvi_yank\fP. jpayne@68: It is an error if the cursor is already at the beginning of the jpayne@68: edit buffer. jpayne@68: .TP jpayne@68: \fBed-prev-history Pq vi command: k, -, Ctrl-P; emacs: Ctrl-P\fP jpayne@68: Replace the edit buffer with the previous history line. jpayne@68: That line is newer than the current line. jpayne@68: With an argument, go back by that number of lines. jpayne@68: It is a non-fatal error to back up by more lines than are available. jpayne@68: .TP jpayne@68: \fBed-prev-line Pq not bound by default\fP jpayne@68: Move the cursor up one line. jpayne@68: With an argument, move up by that number of lines. jpayne@68: It is an error if the edit buffer does not contain enough newline jpayne@68: characters to the left of the cursor position. jpayne@68: .TP jpayne@68: \fBed-prev-word Pq emacs: Meta-B, Meta-b\fP jpayne@68: Move the cursor to the left to the closest beginning of a word. jpayne@68: With an argument, repeat that number of times. jpayne@68: Can be used as a movement command after jpayne@68: \fBvi_change_meta\fP, jpayne@68: \fBvi_delete_meta\fP, jpayne@68: or jpayne@68: \fBvi_yank\fP. jpayne@68: It is an error if the cursor is already at the beginning of the jpayne@68: edit buffer. jpayne@68: .TP jpayne@68: \fBed-quoted-insert Pq vi insert, emacs: Ctrl-V\fP jpayne@68: Read one character from the terminal bypassing the normal line jpayne@68: editing functionality and call jpayne@68: \fBed-insert\fP jpayne@68: on it. jpayne@68: If trying to read the character returns end of file or an error, jpayne@68: call jpayne@68: \fBed-end-of-file\fP jpayne@68: instead. jpayne@68: .TP jpayne@68: \fBed-redisplay Pq vi command, emacs: Ctrl-R\fP jpayne@68: Redisplay everything. jpayne@68: Ignore any argument. jpayne@68: .TP jpayne@68: \fBed-search-next-history Pq vi command: J; emacs: Meta-N, Meta-n\fP jpayne@68: Replace the edit buffer with the next matching history entry. jpayne@68: .TP jpayne@68: \fBed-search-prev-history Pq vi command: K; emacs: Meta-P, Meta-p\fP jpayne@68: Replace the edit buffer with the previous matching history entry. jpayne@68: .TP jpayne@68: \fBed-sequence-lead-in Pq vi cmd: O, \&[; emacs: Ctrl-X;\\fP jpayne@68: both: Meta-O, Meta-[ jpayne@68: Call a macro. jpayne@68: See the section about jpayne@68: .B Macros jpayne@68: below for details. jpayne@68: .TP jpayne@68: \fBed-start-over Pq not bound by default\fP jpayne@68: Discard the contents of the edit buffer and start from scratch. jpayne@68: Ignore any argument. jpayne@68: .TP jpayne@68: \fBed-transpose-chars Pq emacs: Ctrl-T\fP jpayne@68: Exchange the character at the cursor position with the one to the jpayne@68: left of it and move the cursor to the character to the right of the jpayne@68: two exchanged characters. jpayne@68: Ignore any argument. jpayne@68: It is an error if the cursor is at the beginning of the edit buffer jpayne@68: or if the edit buffer contains less than two characters. jpayne@68: .TP jpayne@68: \fBed-unassigned Pq all characters not listed\fP jpayne@68: This editor command always results in an error. jpayne@68: .TP jpayne@68: \fBem-capitol-case Pq emacs: Meta-C, Meta-c\fP jpayne@68: Capitalize the string from the cursor to the end of the current jpayne@68: word. jpayne@68: That is, if it contains at least one alphabetic character, convert jpayne@68: the first alphabetic character to upper case, and convert all jpayne@68: characters to the right of it to lower case. jpayne@68: In any case, move the cursor to the next character after the end jpayne@68: of the current word. jpayne@68: .TP jpayne@68: \fBem-copy-prev-word Pq emacs: Ctrl-Meta-_\fP jpayne@68: Copy the string from the beginning of the current word to the cursor jpayne@68: and insert it to the left of the cursor. jpayne@68: Move the cursor to the character after the inserted string. jpayne@68: It is an error if the cursor is at the beginning of the edit buffer. jpayne@68: .TP jpayne@68: \fBem-copy-region Pq emacs: Meta-W, Meta-w\fP jpayne@68: Copy the string from the cursor to the mark to the cut buffer. jpayne@68: It is an error if the mark is not set. jpayne@68: .TP jpayne@68: \fBem-delete-next-word Pq emacs: Meta-D, Meta-d\fP jpayne@68: Delete the string from the cursor to the end of the current word jpayne@68: and save it to the cut buffer. jpayne@68: It is an error if the cursor is at the end of the edit buffer. jpayne@68: .TP jpayne@68: \fBem-delete-or-list Pq emacs: Ctrl-D, EOF\fP jpayne@68: If the cursor is not at the end of the line, delete the character jpayne@68: at the cursor. jpayne@68: If the edit buffer is empty, indicate end of file to the program. jpayne@68: It is an error if the cursor is at the end of the edit buffer and jpayne@68: the edit buffer is not empty. jpayne@68: .TP jpayne@68: \fBem-delete-prev-char Pq emacs: Ctrl-H, BS, Ctrl-?, DEL\fP jpayne@68: Delete the character to the left of the cursor. jpayne@68: It is an error if the cursor is at the beginning of the edit buffer. jpayne@68: .TP jpayne@68: \fBem-exchange-mark Pq not bound by default\fP jpayne@68: Exchange the cursor and the mark. jpayne@68: .TP jpayne@68: \fBem-gosmacs-transpose Pq not bound by default\fP jpayne@68: Exchange the two characters to the left of the cursor. jpayne@68: It is an error if the cursor is on the first or second character jpayne@68: of the edit buffer. jpayne@68: .TP jpayne@68: \fBem-inc-search-next Pq not bound by default\fP jpayne@68: Emacs incremental next search. jpayne@68: .TP jpayne@68: \fBem-inc-search-prev Pq not bound by default\fP jpayne@68: Emacs incremental reverse search. jpayne@68: .TP jpayne@68: \fBem-kill-line Pq not bound by default\fP jpayne@68: Delete the entire contents of the edit buffer and save it to the jpayne@68: cut buffer. jpayne@68: .TP jpayne@68: \fBem-kill-region Pq emacs: Ctrl-W\fP jpayne@68: Delete the string from the cursor to the mark and save it to the jpayne@68: cut buffer. jpayne@68: It is an error if the mark is not set. jpayne@68: .TP jpayne@68: \fBem-lower-case Pq emacs: Meta-L, Meta-l\fP jpayne@68: Convert the characters from the cursor to the end of the current jpayne@68: word to lower case. jpayne@68: .TP jpayne@68: \fBem-meta-next Pq vi command, emacs: Ctrl-[, ESC\fP jpayne@68: Set the bit 0x80 on the next character typed. jpayne@68: Unless the resulting code point is printable, holding down the jpayne@68: `Meta-' jpayne@68: key while typing that character is a simpler way to achieve the jpayne@68: same effect. jpayne@68: .TP jpayne@68: \fBem-next-word Pq Meta-F, Meta-f\fP jpayne@68: Move the cursor to the end of the current word. jpayne@68: Can be used as a movement command after jpayne@68: \fBvi_change_meta\fP, jpayne@68: \fBvi_delete_meta\fP, jpayne@68: or jpayne@68: \fBvi_yank\fP. jpayne@68: It is an error if the cursor is already at the end of the edit jpayne@68: buffer. jpayne@68: .TP jpayne@68: \fBem-set-mark Pq emacs: Ctrl-Q, NUL\fP jpayne@68: Set the mark at the current cursor position. jpayne@68: .TP jpayne@68: \fBem-toggle-overwrite Pq insert\fP jpayne@68: Switch from insert to overwrite mode or vice versa. jpayne@68: .TP jpayne@68: \fBem-universal-argument Pq not bound by default\fP jpayne@68: If in argument input mode, multiply the argument by 4. jpayne@68: Otherwise, switch to argument input mode and set the argument to 4. jpayne@68: It is an error if the existing argument is already greater than a jpayne@68: million. jpayne@68: .TP jpayne@68: \fBem-upper-case Pq emacs: Meta-U, Meta-u\fP jpayne@68: Convert the characters from the cursor to the end of the current jpayne@68: word to upper case. jpayne@68: .TP jpayne@68: \fBem-yank Pq emacs: Ctrl-Y\fP jpayne@68: Paste the cut buffer to the left of the cursor. jpayne@68: .TP jpayne@68: \fBvi-add Pq vi command: a\fP jpayne@68: Switch to vi insert mode. jpayne@68: Unless the cursor is already at the end of the edit buffer, move jpayne@68: it one character position to the right. jpayne@68: .TP jpayne@68: \fBvi-add-at-eol Pq vi command: A\fP jpayne@68: Switch to vi insert mode and move the cursor to the end of the edit jpayne@68: buffer. jpayne@68: .TP jpayne@68: \fBvi-alias Pq vi command: @\fP jpayne@68: If an alias function was defined by calling the jpayne@68: \fBel_set\fP(3) jpayne@68: or jpayne@68: \fBel_wset\fP(3) jpayne@68: function with the argument jpayne@68: EL_ALIAS_TEXT , jpayne@68: read one character from the terminal bypassing the normal line jpayne@68: editing functionality, call the alias function passing the argument that was specified with jpayne@68: EL_ALIAS_TEXT jpayne@68: as the first argument and the character read, with an underscore jpayne@68: prepended, as the second argument, and pass the string returned jpayne@68: from the alias function to jpayne@68: \fBel_wpush\fP(3). jpayne@68: It is an error if no alias function is defined or if trying to read jpayne@68: the character results in end of file or an error. jpayne@68: .TP jpayne@68: \fBvi-change-case Pq vi command: ~\fP jpayne@68: Change the case of the character at the cursor and move the cursor jpayne@68: one character position to the right. jpayne@68: It is an error if the cursor is already at the end of the edit jpayne@68: buffer. jpayne@68: .TP jpayne@68: \fBvi-change-meta Pq vi command: c\fP jpayne@68: Delete the string from the cursor to the position specified by the jpayne@68: following movement command and save a copy of it to the cut buffer. jpayne@68: When given twice in a row, instead delete the whole contents of the jpayne@68: edit buffer and save a copy of it to the cut buffer. jpayne@68: In either case, switch to vi insert mode after that. jpayne@68: .TP jpayne@68: \fBvi-change-to-eol Pq vi command: C\fP jpayne@68: Delete the string from the cursor position to the end of the line jpayne@68: and save it to the cut buffer, then switch to vi insert mode. jpayne@68: .TP jpayne@68: \fBvi-command-mode Pq vi insert: Ctrl-[, ESC\fP jpayne@68: Discard pending actions and arguments and switch to vi command mode. jpayne@68: Unless the cursor is already at the beginning of the edit buffer, jpayne@68: move it to the left by one character position. jpayne@68: .TP jpayne@68: \fBvi-comment-out Pq vi command: #\fP jpayne@68: Insert a jpayne@68: `#' jpayne@68: character at the beginning of the edit buffer and return the edit jpayne@68: buffer to the program. jpayne@68: .TP jpayne@68: \fBvi-delete-meta Pq vi command: d\fP jpayne@68: Delete the string from the cursor to the position specified by the jpayne@68: following movement command and save a copy of it to the cut buffer. jpayne@68: When given twice in a row, instead delete the whole contents of the jpayne@68: edit buffer and save a copy of it to the cut buffer. jpayne@68: .TP jpayne@68: \fBvi-delete-prev-char Pq vi insert: Ctrl-H, BS, Ctrl-?, DEL\fP jpayne@68: Delete the character to the left of the cursor. jpayne@68: It is an error if the cursor is already at the beginning of the jpayne@68: edit buffer. jpayne@68: .TP jpayne@68: \fBvi-end-big-word Pq vi command: E\fP jpayne@68: Move the cursor to the end of the current space delimited word. jpayne@68: Can be used as a movement command after jpayne@68: \fBvi_change_meta\fP, jpayne@68: \fBvi_delete_meta\fP, jpayne@68: or jpayne@68: \fBvi_yank\fP. jpayne@68: It is an error if the cursor is already at the end of the edit jpayne@68: buffer. jpayne@68: .TP jpayne@68: \fBvi-end-word Pq vi command: e\fP jpayne@68: Move the cursor to the end of the current word. jpayne@68: Can be used as a movement command after jpayne@68: \fBvi_change_meta\fP, jpayne@68: \fBvi_delete_meta\fP, jpayne@68: or jpayne@68: \fBvi_yank\fP. jpayne@68: It is an error if the cursor is already at the end of the edit jpayne@68: buffer. jpayne@68: .TP jpayne@68: \fBvi-history-word Pq vi command: _\fP jpayne@68: Insert the first word from the most recent history entry after the jpayne@68: cursor, move the cursor after to the character after the inserted jpayne@68: word, and switch to vi insert mode. jpayne@68: It is an error if there is no history entry or the most recent jpayne@68: history entry is empty. jpayne@68: .TP jpayne@68: \fBvi-insert Pq vi command: i\fP jpayne@68: Enter insert mode. jpayne@68: .TP jpayne@68: \fBvi-insert-at-bol Pq vi command: I\fP jpayne@68: Move the cursor to the beginning of the edit buffer and switch to jpayne@68: vi insert mode. jpayne@68: .TP jpayne@68: \fBvi-kill-line-prev Pq vi: Ctrl-U\fP jpayne@68: Delete the string from the beginning of the edit buffer to the jpayne@68: cursor and save it to the cut buffer. jpayne@68: .TP jpayne@68: \fBvi-list-or-eof Pq vi insert: Ctrl-D, EOF\fP jpayne@68: If the edit buffer is empty, indicate end of file to the program. jpayne@68: It is an error if the edit buffer is not empty. jpayne@68: .TP jpayne@68: \fBvi-match Pq vi command: %\fP jpayne@68: Consider opening and closing parentheses, braces, and brackets as jpayne@68: delimiters. jpayne@68: If the cursor is not at a delimiter, move it to the right until it jpayne@68: gets to one, then move it to the matching delimiter. jpayne@68: Can be used as a movement command after jpayne@68: \fBvi_change_meta\fP, jpayne@68: \fBvi_delete_meta\fP, jpayne@68: or jpayne@68: \fBvi_yank\fP. jpayne@68: It is an error if there is no delimiter at the cursor or in the jpayne@68: string to the right of the cursor, or if the first such delimiter jpayne@68: has no matching delimiter. jpayne@68: .TP jpayne@68: \fBvi-next-big-word Pq vi command: W\fP jpayne@68: Move the cursor to the right to the beginning of the next space jpayne@68: delimited word. jpayne@68: Can be used as a movement command after jpayne@68: \fBvi_change_meta\fP, jpayne@68: \fBvi_delete_meta\fP, jpayne@68: or jpayne@68: \fBvi_yank\fP. jpayne@68: It is an error if the cursor is already at the end of the edit jpayne@68: buffer or on its last character. jpayne@68: .TP jpayne@68: \fBvi-next-char Pq vi command: f\fP jpayne@68: Read one character from the terminal bypassing the normal line jpayne@68: editing functionality and move the cursor to the right to the next jpayne@68: instance of that character in the edit buffer. jpayne@68: Can be used as a movement command after jpayne@68: \fBvi_change_meta\fP, jpayne@68: \fBvi_delete_meta\fP, jpayne@68: or jpayne@68: \fBvi_yank\fP. jpayne@68: If trying to read the character results in end of file or an error, jpayne@68: call jpayne@68: \fBed-end-of-file\fP jpayne@68: instead. jpayne@68: It is an error if the character is not found searching to the right jpayne@68: in the edit buffer. jpayne@68: .TP jpayne@68: \fBvi-next-word Pq vi command: w\fP jpayne@68: Move the cursor to the right to the beginning of the next word. jpayne@68: Can be used as a movement command after jpayne@68: \fBvi_change_meta\fP, jpayne@68: \fBvi_delete_meta\fP, jpayne@68: or jpayne@68: \fBvi_yank\fP. jpayne@68: It is an error if the cursor is already at the end of the edit jpayne@68: buffer or on its last character. jpayne@68: .TP jpayne@68: \fBvi-paste-next Pq vi command: p\fP jpayne@68: Insert a copy of the cut buffer to the right of the cursor. jpayne@68: It is an error if the cut buffer is empty. jpayne@68: .TP jpayne@68: \fBvi-paste-prev Pq vi command: P\fP jpayne@68: Insert a copy of the cut buffer to the left of the cursor. jpayne@68: It is an error if the cut buffer is empty. jpayne@68: .TP jpayne@68: \fBvi-prev-big-word Pq vi command: B\fP jpayne@68: Move the cursor to the left to the next beginning of a space delimited jpayne@68: word. jpayne@68: Can be used as a movement command after jpayne@68: \fBvi_change_meta\fP, jpayne@68: \fBvi_delete_meta\fP, jpayne@68: or jpayne@68: \fBvi_yank\fP. jpayne@68: It is an error if the cursor is already at the beginning of the jpayne@68: edit buffer. jpayne@68: .TP jpayne@68: \fBvi-prev-char Pq vi command: F\fP jpayne@68: Read one character from the terminal bypassing the normal line jpayne@68: editing functionality and move the cursor to the left to the next jpayne@68: instance of that character in the edit buffer. jpayne@68: Can be used as a movement command after jpayne@68: \fBvi_change_meta\fP, jpayne@68: \fBvi_delete_meta\fP, jpayne@68: or jpayne@68: \fBvi_yank\fP. jpayne@68: If trying to read the character results in end of file or an error, jpayne@68: call jpayne@68: \fBed-end-of-file\fP jpayne@68: instead. jpayne@68: It is an error if the character is not found searching to the left jpayne@68: in the edit buffer. jpayne@68: .TP jpayne@68: \fBvi-prev-word Pq vi command: b\fP jpayne@68: Move the cursor to the left to the next beginning of a word. jpayne@68: Can be used as a movement command after jpayne@68: \fBvi_change_meta\fP, jpayne@68: \fBvi_delete_meta\fP, jpayne@68: or jpayne@68: \fBvi_yank\fP. jpayne@68: It is an error if the cursor is already at the beginning of the jpayne@68: edit buffer. jpayne@68: .TP jpayne@68: \fBvi-redo Pq vi command: Sq \&.\fP jpayne@68: Redo the last non-motion command. jpayne@68: .TP jpayne@68: \fBvi-repeat-next-char Pq vi command: Sq \&;\fP jpayne@68: Repeat the most recent character search in the same search direction. jpayne@68: Can be used as a movement command after jpayne@68: \fBvi_change_meta\fP, jpayne@68: \fBvi_delete_meta\fP, jpayne@68: or jpayne@68: \fBvi_yank\fP. jpayne@68: .TP jpayne@68: \fBvi-repeat-prev-char Pq vi command: Sq \&,\fP jpayne@68: Repeat the most recent character search in the opposite search jpayne@68: direction. jpayne@68: Can be used as a movement command after jpayne@68: \fBvi_change_meta\fP, jpayne@68: \fBvi_delete_meta\fP, jpayne@68: or jpayne@68: \fBvi_yank\fP. jpayne@68: .TP jpayne@68: \fBvi-repeat-search-next Pq vi command: n\fP jpayne@68: Repeat the most recent history search in the same search direction. jpayne@68: .TP jpayne@68: \fBvi-repeat-search-prev Pq vi command: N\fP jpayne@68: Repeat the most recent history search in the opposite search jpayne@68: direction. jpayne@68: .TP jpayne@68: \fBvi-replace-char Pq vi command: r\fP jpayne@68: Switch to vi replace mode, and automatically switch back to vi jpayne@68: command mode after the next character typed. jpayne@68: See jpayne@68: \fBed-insert\fP jpayne@68: for a description of replace mode. jpayne@68: It is an error if the cursor is at the end of the edit buffer. jpayne@68: .TP jpayne@68: \fBvi-replace-mode Pq vi command: R\fP jpayne@68: Switch to vi replace mode. jpayne@68: This is a variant of vi insert mode; see jpayne@68: \fBed-insert\fP jpayne@68: for the difference. jpayne@68: .TP jpayne@68: \fBvi-search-next Pq vi command: \&?\fP jpayne@68: Replace the edit buffer with the next matching history entry. jpayne@68: .TP jpayne@68: \fBvi-search-prev Pq vi command: /\fP jpayne@68: Replace the edit buffer with the previous matching history entry. jpayne@68: .TP jpayne@68: \fBvi-substitute-char Pq vi command: s\fP jpayne@68: Delete the character at the cursor and switch to vi insert mode. jpayne@68: .TP jpayne@68: \fBvi-substitute-line Pq vi command: S\fP jpayne@68: Delete the entire contents of the edit buffer, save a copy of it jpayne@68: in the cut buffer, and enter vi insert mode. jpayne@68: .TP jpayne@68: \fBvi-to-column Pq vi command: \&|\fP jpayne@68: Move the cursor to the column specified as the argument. jpayne@68: Can be used as a movement command after jpayne@68: \fBvi_change_meta\fP, jpayne@68: \fBvi_delete_meta\fP, jpayne@68: or jpayne@68: \fBvi_yank\fP. jpayne@68: .TP jpayne@68: \fBvi-to-history-line Pq vi command: G\fP jpayne@68: Replace the edit buffer with the specified history entry. jpayne@68: .TP jpayne@68: \fBvi-to-next-char Pq vi command: t\fP jpayne@68: Read one character from the terminal bypassing the normal line jpayne@68: editing functionality and move the cursor to the right to the jpayne@68: character before the next instance of that character in the edit jpayne@68: buffer. jpayne@68: Can be used as a movement command after jpayne@68: \fBvi_change_meta\fP, jpayne@68: \fBvi_delete_meta\fP, jpayne@68: or jpayne@68: \fBvi_yank\fP. jpayne@68: If trying to read the character results in end of file or an error, jpayne@68: call jpayne@68: \fBed-end-of-file\fP jpayne@68: instead. jpayne@68: It is an error if the character is not found searching to the right jpayne@68: in the edit buffer. jpayne@68: .TP jpayne@68: \fBvi-to-prev-char Pq vi command: T\fP jpayne@68: Read one character from the terminal bypassing the normal line jpayne@68: editing functionality and move the cursor to the left to the character jpayne@68: after the next instance of that character in the edit buffer. jpayne@68: Can be used as a movement command after jpayne@68: \fBvi_change_meta\fP, jpayne@68: \fBvi_delete_meta\fP, jpayne@68: or jpayne@68: \fBvi_yank\fP. jpayne@68: If trying to read the character results in end of file or an error, jpayne@68: call jpayne@68: \fBed-end-of-file\fP jpayne@68: instead. jpayne@68: It is an error if the character is not found searching to the left jpayne@68: in the edit buffer. jpayne@68: .TP jpayne@68: \fBvi-undo Pq vi command: u\fP jpayne@68: Undo the last change. jpayne@68: .TP jpayne@68: \fBvi-undo-line Pq vi command: U\fP jpayne@68: Undo all changes to the edit buffer. jpayne@68: .TP jpayne@68: \fBvi-yank Pq vi command: y\fP jpayne@68: Copy the string from the cursor to the position specified by the jpayne@68: following movement command to the cut buffer. jpayne@68: When given twice in a row, instead copy the whole contents of the jpayne@68: edit buffer to the cut buffer. jpayne@68: .TP jpayne@68: \fBvi-yank-end Pq vi command: Y\fP jpayne@68: Copy the string from the cursor to the end of the edit buffer to jpayne@68: the cut buffer. jpayne@68: .TP jpayne@68: \fBvi-zero Pq vi command: 0\fP jpayne@68: If in argument input mode, multiply the argument by ten. jpayne@68: Otherwise, move the cursor to the beginning of the edit buffer. jpayne@68: Can be used as a movement command after jpayne@68: \fBvi_change_meta\fP, jpayne@68: \fBvi_delete_meta\fP, jpayne@68: or jpayne@68: \fBvi_yank\fP. jpayne@68: .SS Macros jpayne@68: If an input character is bound to the editor command jpayne@68: \fBed-sequence-lead-in\fP, jpayne@68: \fBeditline\fP jpayne@68: attempts to call a macro. jpayne@68: If the input character by itself forms the name of a macro, that jpayne@68: macro is executed. jpayne@68: Otherwise, additional input characters are read until the string jpayne@68: read forms the name of a macro, in which case that macro is executed, jpayne@68: or until the string read matches the beginning of none of the existing jpayne@68: macro names, in which case the string including the final, mismatching jpayne@68: character is discarded and the terminal bell is rung. jpayne@68: jpayne@68: There are two kinds of macros. jpayne@68: Command macros execute a single editor command. jpayne@68: Keyboard macros return a string of characters that is appended jpayne@68: as a new line to the jpayne@68: .B Input Queue . jpayne@68: jpayne@68: The following command macros are defined by default in vi command jpayne@68: mode and in emacs mode: jpayne@68: It Esc \&[ A, Esc O A Ta \fBed-prev-history\fP jpayne@68: It Esc \&[ B, Esc O B Ta \fBed-next-history\fP jpayne@68: It Esc \&[ C, Esc O C Ta \fBed-next-char\fP jpayne@68: It Esc \&[ D, Esc O D Ta \fBed-prev-char\fP jpayne@68: It Esc \&[ F, Esc O F Ta \fBed-move-to-end\fP jpayne@68: It Esc \&[ H, Esc O H Ta \fBed-move-to-beg\fP jpayne@68: jpayne@68: In vi command mode, they are also defined by default without the jpayne@68: initial escape character. jpayne@68: jpayne@68: In addition, the jpayne@68: \fBeditline\fP jpayne@68: library tries to bind the strings generated by the arrow keys jpayne@68: as reported by the jpayne@68: \fBterminfo\fP(5) jpayne@68: database to these editor commands, unless that would clobber jpayne@68: user settings. jpayne@68: jpayne@68: In emacs mode, the two-character string jpayne@68: ``Ctrl-X Ctrl-X'' jpayne@68: is bound to the jpayne@68: \fBem-exchange-mark\fP jpayne@68: editor command. jpayne@68: .SS Input Queue jpayne@68: The jpayne@68: \fBeditline\fP jpayne@68: library maintains an input queue operated in FIFO mode. jpayne@68: Whenever it needs an input character, it takes the first character jpayne@68: from the first line of the input queue. jpayne@68: When the queue is empty, it reads from the terminal. jpayne@68: jpayne@68: A line can be appended to the end of the input queue in several ways: jpayne@68: It jpayne@68: By calling one of the keyboard jpayne@68: .B Macros . jpayne@68: It jpayne@68: By calling the editor command jpayne@68: \fBvi-redo\fP. jpayne@68: It jpayne@68: By calling the editor command jpayne@68: \fBvi-alias\fP. jpayne@68: It jpayne@68: By pressing a key in emacs incremental search mode that doesn't jpayne@68: have a special meaning in that mode but returns to normal emacs jpayne@68: mode. jpayne@68: It jpayne@68: If an application program directly calls the functions jpayne@68: \fBel_push\fP(3) jpayne@68: or jpayne@68: \fBel_wpush\fP(3), jpayne@68: it can provide additional, program-specific ways jpayne@68: of appending to the input queue. jpayne@68: .SH SEE ALSO jpayne@68: \fBmg\fP(1), jpayne@68: \fBvi\fP(1), jpayne@68: \fBeditline\fP(3), jpayne@68: \fBel_wgets\fP(3), jpayne@68: \fBel_wpush\fP(3), jpayne@68: \fBel_wset\fP(3), jpayne@68: \fBeditrc\fP(5) jpayne@68: .SH HISTORY jpayne@68: This manual page first appeared in jpayne@68: Ox 6.0 jpayne@68: and jpayne@68: Nx 8 . jpayne@68: .SH AUTHORS jpayne@68: jpayne@68: -nosplit jpayne@68: This manual page was written by jpayne@68: jpayne@68: Ingo Schwarze