1 '\" te
   2 .\" Copyright (c) 2000, 2001, 2002, 2003, 2004 by Martin C. Shepherd. All Rights Reserved.
   3 .\" Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the
   4 .\" "Software"), to deal in the Software without restriction, including
   5 .\" without limitation the rights to use, copy, modify, merge, publish,
   6 .\" distribute, and/or sell copies of the Software, and to permit persons
   7 .\" to whom the Software is furnished to do so, provided that the above
   8 .\" copyright notice(s) and this permission notice appear in all copies of
   9 .\" the Software and that both the above copyright notice(s) and this
  10 .\" permission notice appear in supporting documentation.
  11 .\"
  12 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  13 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  14 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
  15 .\" OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
  16 .\" HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
  17 .\" INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
  18 .\" FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
  19 .\" NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
  20 .\" WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  21 .\"
  22 .\" Except as contained in this notice, the name of a copyright holder
  23 .\" shall not be used in advertising or otherwise to promote the sale, use
  24 .\" or other dealings in this Software without prior written authorization
  25 .\" of the copyright holder.
  26 .\" Portions Copyright (c) 2005, Sun Microsystems, Inc. All Rights Reserved.
  27 .TH TECLA 5 "May 20, 2004"
  28 .SH NAME
  29 tecla, teclarc \- User interface provided by the tecla library.
  30 .SH DESCRIPTION
  31 .sp
  32 .LP
  33 This man page describes the command-line editing features that are available to
  34 users of programs that read keyboard input via the tecla library. Users of the
  35 \fBtcsh shell\fR will find the default key bindings very familiar. Users of the
  36 \fBbash\fR shell will also find it quite familiar, but with a few minor
  37 differences, most notably in how forward and backward searches through the list
  38 of historical commands are performed. There are two major editing modes, one
  39 with \fBemacs\fR-like key bindings and another with \fBvi\fR-like key bindings.
  40 By default \fBemacs\fR mode is enabled, but \fBvi\fR(1) mode can alternatively
  41 be selected via the user's configuration file. This file can also be used to
  42 change the bindings of individual keys to suit the user's preferences. By
  43 default, tab completion is provided. If the application hasn't reconfigured
  44 this to complete other types of symbols, then tab completion completes file
  45 names.
  46 .SS "Key Sequence Notation"
  47 .sp
  48 .LP
  49 In the rest of this man page, and also in all tecla configuration files, key
  50 sequences are expressed as follows.
  51 .sp
  52 .ne 2
  53 .na
  54 \fB\fB^A\fR or \fBC-a\fR\fR
  55 .ad
  56 .RS 13n
  57 This is a 'CONTROL-A', entered by pressing the CONTROL key at the same time as
  58 the 'A' key.
  59 .RE
  60 
  61 .sp
  62 .ne 2
  63 .na
  64 \fB\fB\E\fR or \fBM-\fR\fR
  65 .ad
  66 .RS 13n
  67 In key sequences, both of these notations can be entered either by pressing the
  68 ESCAPE key, then the following key, or by pressing the META key at the same
  69 time as the following key. Thus the key sequence \fBM-p\fR can be typed in two
  70 ways, by pressing the ESCAPE key, followed by pressing 'P', or by pressing the
  71 META key at the same time as 'P'.
  72 .RE
  73 
  74 .sp
  75 .ne 2
  76 .na
  77 \fBup\fR
  78 .ad
  79 .RS 13n
  80 This refers to the up-arrow key.
  81 .RE
  82 
  83 .sp
  84 .ne 2
  85 .na
  86 \fBdown\fR
  87 .ad
  88 .RS 13n
  89 This refers to the down-arrow key.
  90 .RE
  91 
  92 .sp
  93 .ne 2
  94 .na
  95 \fBleft\fR
  96 .ad
  97 .RS 13n
  98 This refers to the left-arrow key.
  99 .RE
 100 
 101 .sp
 102 .ne 2
 103 .na
 104 \fBright\fR
 105 .ad
 106 .RS 13n
 107 This refers to the right-arrow key.
 108 .RE
 109 
 110 .sp
 111 .ne 2
 112 .na
 113 \fBa\fR
 114 .ad
 115 .RS 13n
 116 This is just a normal 'A' key.
 117 .RE
 118 
 119 .SS "The Tecla Configuration File"
 120 .sp
 121 .LP
 122 By default, tecla looks for a file called \fB\&.teclarc\fR in your home
 123 directory (ie. \fB~/.teclarc\fR). If it finds this file, it reads it,
 124 interpreting each line as defining a new key binding or an editing
 125 configuration option. Since the \fBemacs\fR key-bindings are installed by
 126 default, if you want to use the non-default \fBvi\fR editing mode, the most
 127 important item to go in this file is the following line:
 128 .sp
 129 .in +2
 130 .nf
 131 edit-mode vi
 132 .fi
 133 .in -2
 134 
 135 .sp
 136 .LP
 137 This will re-configure the default bindings for \fBvi\fR-mode. The complete set
 138 of arguments that this command accepts are:
 139 .sp
 140 .ne 2
 141 .na
 142 \fBvi\fR
 143 .ad
 144 .RS 9n
 145 Install key bindings like those of the \fBvi\fR editor.
 146 .RE
 147 
 148 .sp
 149 .ne 2
 150 .na
 151 \fBemacs\fR
 152 .ad
 153 .RS 9n
 154 Install key bindings like those of the \fBemacs\fR editor. This is the default.
 155 .RE
 156 
 157 .sp
 158 .ne 2
 159 .na
 160 \fBnone\fR
 161 .ad
 162 .RS 9n
 163 Use just the native line editing facilities provided by the terminal driver.
 164 .RE
 165 
 166 .sp
 167 .LP
 168 To prevent the terminal bell from being rung, such as when an unrecognized
 169 control-sequence is typed, place the following line in the configuration file:
 170 .sp
 171 .in +2
 172 .nf
 173 nobeep
 174 .fi
 175 .in -2
 176 
 177 .sp
 178 .LP
 179 An example of a key binding line in the configuration file is the following.
 180 .sp
 181 .in +2
 182 .nf
 183 bind M-[2~ insert-mode
 184 .fi
 185 .in -2
 186 
 187 .sp
 188 .LP
 189 On many keyboards, the above key sequence is generated when one presses the
 190 insert key, so with this key binding, one can toggle between the
 191 \fBemacs\fR-mode insert and overwrite modes by hitting one key. One could also
 192 do it by typing out the above sequence of characters one by one. As explained
 193 above, the \fBM-\fR part of this sequence can be typed either by pressing the
 194 ESCAPE key before the following key, or by pressing the META key at the same
 195 time as the following key. Thus if you had set the above key binding, and the
 196 insert key on your keyboard didn't generate the above key sequence, you could
 197 still type it in either of the following 2 ways.
 198 .RS +4
 199 .TP
 200 1.
 201 Hit the ESCAPE key momentarily, then press '[', then '2', then finally '~'.
 202 .RE
 203 .RS +4
 204 .TP
 205 2.
 206 Press the META key at the same time as pressing the '[' key, then press '2',
 207 then '~'.
 208 .RE
 209 .sp
 210 .LP
 211 If you set a key binding for a key sequence that is already bound to a
 212 function, the new binding overrides the old one. If in the new binding you omit
 213 the name of the new function to bind to the key sequence, the original binding
 214 becomes undefined.
 215 .sp
 216 .LP
 217 Starting with versions of \fBlibtecla\fR later than 1.3.3 it is now possible to
 218 bind key sequences that begin with a printable character. Previously key
 219 sequences were required to start with a CONTROL or META character.
 220 .sp
 221 .LP
 222 Note that the special keywords "up", "down", "left", and "right" refer to the
 223 arrow keys, and are thus not treated as key sequences. So, for example, to
 224 rebind the up and down arrow keys to use the history search mechanism instead
 225 of the simple history recall method, you could place the following in your
 226 configuration file:
 227 .sp
 228 .in +2
 229 .nf
 230 bind up history-search-backwards
 231 bind down history-search-backwards
 232 .fi
 233 .in -2
 234 
 235 .sp
 236 .LP
 237 To unbind an existing binding, you can do this with the bind command by
 238 omitting to name any action to rebind the key sequence to. For example, by not
 239 specifying an action function, the following command unbinds the default
 240 beginning-of-line action from the \fB^A\fR key sequence:
 241 .sp
 242 .in +2
 243 .nf
 244 bind ^A
 245 .fi
 246 .in -2
 247 
 248 .sp
 249 .LP
 250 If you create a \fB~/.teclarc\fR configuration file, but it appears to have no
 251 effect on the program, check the documentation of the program to see if the
 252 author chose a different name for this file.
 253 .SS "Filename and Tilde Completion"
 254 .sp
 255 .LP
 256 With the default key bindings, pressing the TAB key (aka. \fB^I\fR) results in
 257 tecla attempting to complete the incomplete file name that precedes the cursor.
 258 Tecla searches backwards from the cursor, looking for the start of the file
 259 name, stopping when it hits either a space or the start of the line. If more
 260 than one file has the specified prefix, then tecla completes the file name up
 261 to the point at which the ambiguous matches start to differ, then lists the
 262 possible matches.
 263 .sp
 264 .LP
 265 In addition to literally written file names, tecla can complete files that
 266 start with \fB~/\fR and \fB~user/\fR expressions and that contain \fB$envvar\fR
 267 expressions. In particular, if you hit TAB within an incomplete \fB~user\fR,
 268 expression, tecla will attempt to complete the username, listing any ambiguous
 269 matches.
 270 .sp
 271 .LP
 272 The completion binding is implemented using the \fBcpl_complete_word()\fR
 273 function, which is also available separately to users of this library. See the
 274 \fBcpl_complete_word\fR(3TECLA) man page for more details.
 275 .SS "Filename Expansion"
 276 .sp
 277 .LP
 278 With the default key bindings, pressing \fB^X*\fR causes tecla to expand the
 279 file name that precedes the cursor, replacing \fB~/\fR and \fB~user/\fR
 280 expressions with the corresponding home directories, and replacing
 281 \fB$envvar\fR expressions with the value of the specified environment variable,
 282 then if there are any wildcards, replacing the so far expanded file name with a
 283 space-separated list of the files which match the wild cards.
 284 .sp
 285 .LP
 286 The expansion binding is implemented using the \fBef_expand_file()\fR function.
 287 See the \fBef_expand_file\fR(3TECLA) man page for more details.
 288 .SS "Recalling Previously Typed Lines"
 289 .sp
 290 .LP
 291 Every time that a new line is entered by the user, it is appended to a list of
 292 historical input lines maintained within the \fBGetLine\fR resource object. You
 293 can traverse up and down this list using the up and down arrow keys.
 294 Alternatively, you can do the same with the \fB^P\fR, and \fB^N\fR keys, and in
 295 \fBvi\fR command mode you can alternatively use the k and j characters. Thus
 296 pressing up-arrow once, replaces the current input line with the previously
 297 entered line. Pressing up-arrow again, replaces this with the line that was
 298 entered before it, etc.. Having gone back one or more lines into the history
 299 list, one can return to newer lines by pressing down-arrow one or more times.
 300 If you do this sufficient times, you will return to the original line that you
 301 were entering when you first hit up-arrow.
 302 .sp
 303 .LP
 304 Note that in \fBvi\fR mode, all of the history recall functions switch the
 305 library into command mode.
 306 .sp
 307 .LP
 308 In \fBemacs\fR mode the \fBM-p\fR and \fBM-n\fR keys work just like the
 309 \fB^P\fR and \fB^N\fR keys, except that they skip all but those historical
 310 lines which share the prefix that precedes the cursor. In \fBvi\fR command mode
 311 the upper case 'K' and 'J' characters do the same thing, except that the string
 312 that they search for includes the character under the cursor as well as what
 313 precedes it.
 314 .sp
 315 .LP
 316 Thus for example, suppose that you were in \fBemacs\fR mode, and you had just
 317 entered the following list of commands in the order shown:
 318 .sp
 319 .in +2
 320 .nf
 321 ls ~/tecla/
 322 cd ~/tecla
 323 ls -l getline.c
 324 \fBemacs\fR ~/tecla/getline.c
 325 .fi
 326 .in -2
 327 
 328 .sp
 329 .LP
 330 If you next typed:
 331 .sp
 332 .in +2
 333 .nf
 334 ls
 335 .fi
 336 .in -2
 337 
 338 .sp
 339 .LP
 340 and then hit \fBM-p\fR, then rather than returning the previously typed
 341 \fBemacs\fR line, which doesn't start with "ls", tecla would recall the "ls -l
 342 getline.c" line. Pressing \fBM-p\fR again would recall the "ls ~/tecla/" line.
 343 .sp
 344 .LP
 345 Note that if the string that you are searching for, contains any of the special
 346 characters, *, ?, or '[', then it is interpretted as a pattern to be matched.
 347 Thus, cotinuing with the above example, after typing in the list of commands
 348 shown, if you then typed:
 349 .sp
 350 .in +2
 351 .nf
 352 *tecla*
 353 .fi
 354 .in -2
 355 
 356 .sp
 357 .LP
 358 and hit \fBM-p\fR, then the "\fBemacs\fR ~/tecla/getline.c" line would be
 359 recalled first, since it contains the word tecla somewhere in the line,
 360 Similarly, hitting \fBM-p\fR again, would recall the "ls ~/tecla/" line, and
 361 hitting it once more would recall the "ls ~/tecla/" line. The pattern syntax is
 362 the same as that described for file name expansion, in the
 363 \fBef_expand_file\fR(3TECLA).
 364 .SS "History Files"
 365 .sp
 366 .LP
 367 Authors of programs that use the tecla library have the option of saving
 368 historical command-lines in a file before exiting, and subsequently reading
 369 them back in from this file when the program is next started. There is no
 370 standard name for this file, since it makes sense for each application to use
 371 its own history file, so that commands from different applications don't get
 372 mixed up.
 373 .SS "International Character Sets"
 374 .sp
 375 .LP
 376 Since \fBlibtecla\fR version 1.4.0, tecla has been 8-bit clean. This means that
 377 all 8-bit characters that are printable in the user's current locale are now
 378 displayed verbatim and included in the returned input line. Assuming that the
 379 calling program correctly contains a call like the following,
 380 .sp
 381 .in +2
 382 .nf
 383 setlocale(LC_CTYPE, "");
 384 .fi
 385 .in -2
 386 
 387 .sp
 388 .LP
 389 then the current locale is determined by the first of the environment variables
 390 \fBLC_CTYPE\fR, \fBLC_ALL\fR, and \fBLANG\fR, that is found to contain a valid
 391 locale name. If none of these variables are defined, or the program neglects to
 392 call \fBsetlocale\fR, then the default C locale is used, which is US 7-bit
 393 ASCII. On most unix-like platforms, you can get a list of valid locales by
 394 typing the command:
 395 .sp
 396 .in +2
 397 .nf
 398 locale -a
 399 .fi
 400 .in -2
 401 
 402 .sp
 403 .LP
 404 at the shell prompt.
 405 .SS "Meta Keys and Locales"
 406 .sp
 407 .LP
 408 Beware that in most locales other than the default C locale, META characters
 409 become printable, and they are then no longer considered to match \fBM-c\fR
 410 style key bindings. This allows international characters to be entered with the
 411 compose key without unexpectedly triggering META key bindings. You can still
 412 invoke META bindings, since there are actually two ways to do this. For example
 413 the binding \fBM-c\fR can also be invoked by pressing the ESCAPE key
 414 momentarily, then pressing the c key, and this will work regardless of locale.
 415 Moreover, many modern terminal emulators, such as gnome's gnome-terminal's and
 416 KDE's konsole terminals, already generate escape pairs like this when you use
 417 the META key, rather than a real meta character, and other emulators usually
 418 have a way to request this behavior, so you can continue to use the META key on
 419 most systems.
 420 .sp
 421 .LP
 422 For example, although xterm terminal emulators generate real 8-bit meta
 423 characters by default when you use the META key, they can be configured to
 424 output the equivalent escape pair by setting their \fBEightBitInput\fR X
 425 resource to False. You can either do this by placing a line like the following
 426 in your \fB~/.Xdefaults\fR file,
 427 .sp
 428 .in +2
 429 .nf
 430 XTerm*EightBitInput: False
 431 .fi
 432 .in -2
 433 
 434 .sp
 435 .LP
 436 or by starting an \fBxterm\fR with an \fB-xrm\fR \&'*EightBitInput: False'
 437 command-line argument. In recent versions of xterm you can toggle this feature
 438 on and off with the 'Meta Sends Escape' option in the menu that is displayed
 439 when you press the left mouse button and the CONTROL key within an xterm
 440 window. In CDE, dtterms can be similarly coerced to generate escape pairs in
 441 place of meta characters, by setting the \fBDtterm*KshMode\fR resource to True.
 442 .SS "Entering International Characters"
 443 .sp
 444 .LP
 445 If you don't have a keyboard that generates all of the international characters
 446 that you need, there is usually a compose key that will allow you to enter
 447 special characters, or a way to create one. For example, under X windows on
 448 unix-like systems, if your keyboard doesn't have a compose key, you can
 449 designate a redundant key to serve this purpose with the xmodmap command. For
 450 example, on many PC keyboards there is a microsoft-windows key, which is
 451 otherwise useless under Linux. On a laptop, for example, the \fBxev\fR program
 452 might report that pressing this key generates keycode 115. To turn this key
 453 into a COMPOSE  key, do the following:
 454 .sp
 455 .in +2
 456 .nf
 457 xmodmap -e 'keycode 115 = Multi_key'
 458 .fi
 459 .in -2
 460 
 461 .sp
 462 .LP
 463 Type this key followed by a " character to enter an 'I' with a umlaut over it.
 464 .SS "The Available Key Binding Functions"
 465 .sp
 466 .LP
 467 The following is a list of the editing functions provided by the tecla library.
 468 The names in the leftmost column of the list can be used in configuration files
 469 to specify which function a given key or combination of keys should invoke.
 470 They are also used in the next two sections to list the default key bindings in
 471 \fBemacs\fR and \fBvi\fR modes.
 472 .sp
 473 .ne 2
 474 .na
 475 \fBuser-interrupt\fR
 476 .ad
 477 .RS 30n
 478 Send a SIGINT signal to the parent process.
 479 .RE
 480 
 481 .sp
 482 .ne 2
 483 .na
 484 \fBsuspend\fR
 485 .ad
 486 .RS 30n
 487 Suspend the parent process.
 488 .RE
 489 
 490 .sp
 491 .ne 2
 492 .na
 493 \fBstop-output\fR
 494 .ad
 495 .RS 30n
 496 Pause terminal output.
 497 .RE
 498 
 499 .sp
 500 .ne 2
 501 .na
 502 \fBstart-output\fR
 503 .ad
 504 .RS 30n
 505 Resume paused terminal output.
 506 .RE
 507 
 508 .sp
 509 .ne 2
 510 .na
 511 \fBliteral-next\fR
 512 .ad
 513 .RS 30n
 514 Arrange for the next character to be treated as a normal character. This allows
 515 control characters to be entered.
 516 .RE
 517 
 518 .sp
 519 .ne 2
 520 .na
 521 \fBcursor-right\fR
 522 .ad
 523 .RS 30n
 524 Move the cursor one character right.
 525 .RE
 526 
 527 .sp
 528 .ne 2
 529 .na
 530 \fBcursor-left\fR
 531 .ad
 532 .RS 30n
 533 Move the cursor one character left.
 534 .RE
 535 
 536 .sp
 537 .ne 2
 538 .na
 539 \fBinsert-mode\fR
 540 .ad
 541 .RS 30n
 542 Toggle between insert mode and overwrite mode.
 543 .RE
 544 
 545 .sp
 546 .ne 2
 547 .na
 548 \fBbeginning-of-line\fR
 549 .ad
 550 .RS 30n
 551 Move the cursor to the beginning of the line.
 552 .RE
 553 
 554 .sp
 555 .ne 2
 556 .na
 557 \fBend-of-line\fR
 558 .ad
 559 .RS 30n
 560 Move the cursor to the end of the line.
 561 .RE
 562 
 563 .sp
 564 .ne 2
 565 .na
 566 \fBdelete-line\fR
 567 .ad
 568 .RS 30n
 569 Delete the contents of the current line.
 570 .RE
 571 
 572 .sp
 573 .ne 2
 574 .na
 575 \fBkill-line\fR
 576 .ad
 577 .RS 30n
 578 Delete everything that follows the cursor.
 579 .RE
 580 
 581 .sp
 582 .ne 2
 583 .na
 584 \fBbackward-kill-line\fR
 585 .ad
 586 .RS 30n
 587 Delete all characters between the cursor and the start of the line.
 588 .RE
 589 
 590 .sp
 591 .ne 2
 592 .na
 593 \fBforward-word\fR
 594 .ad
 595 .RS 30n
 596 Move to the end of the word which follows the cursor.
 597 .RE
 598 
 599 .sp
 600 .ne 2
 601 .na
 602 \fBforward-to-word\fR
 603 .ad
 604 .RS 30n
 605 Move the cursor to the start of the word that follows the cursor.
 606 .RE
 607 
 608 .sp
 609 .ne 2
 610 .na
 611 \fBbackward-word\fR
 612 .ad
 613 .RS 30n
 614 Move to the start of the word which precedes the cursor.
 615 .RE
 616 
 617 .sp
 618 .ne 2
 619 .na
 620 \fBgoto-column\fR
 621 .ad
 622 .RS 30n
 623 Move the cursor to the 1-relative column in the line specified by any preceding
 624 digit-argument sequences (see Entering Repeat Counts below).
 625 .RE
 626 
 627 .sp
 628 .ne 2
 629 .na
 630 \fBfind-parenthesis\fR
 631 .ad
 632 .RS 30n
 633 If the cursor is currently over a parenthesis character, move it to the
 634 matching parenthesis character. If not over a parenthesis character move right
 635 to the next close parenthesis.
 636 .RE
 637 
 638 .sp
 639 .ne 2
 640 .na
 641 \fBforward-delete-char\fR
 642 .ad
 643 .RS 30n
 644 Delete the character under the cursor.
 645 .RE
 646 
 647 .sp
 648 .ne 2
 649 .na
 650 \fBbackward-delete-char\fR
 651 .ad
 652 .RS 30n
 653 Delete the character which precedes the cursor.
 654 .RE
 655 
 656 .sp
 657 .ne 2
 658 .na
 659 \fBlist-or-eof\fR
 660 .ad
 661 .RS 30n
 662 This is intended for binding to \fB^D\fR. When invoked when the cursor is
 663 within the line it displays all possible completions then redisplays the line
 664 unchanged. When invoked on an empty line, it signals end-of-input (EOF) to the
 665 caller of \fBgl_get_line()\fR.
 666 .RE
 667 
 668 .sp
 669 .ne 2
 670 .na
 671 \fBdel-char-or-list-or-eof\fR
 672 .ad
 673 .RS 30n
 674 This is intended for binding to \fB^D\fR. When invoked when the cursor is
 675 within the line it invokes forward-delete-char. When invoked at the end of the
 676 line it displays all possible completions then redisplays the line unchanged.
 677 When invoked on an empty line, it signals end-of-input (EOF) to the caller of
 678 \fBgl_get_line()\fR.
 679 .RE
 680 
 681 .sp
 682 .ne 2
 683 .na
 684 \fBforward-delete-word\fR
 685 .ad
 686 .RS 30n
 687 Delete the word which follows the cursor.
 688 .RE
 689 
 690 .sp
 691 .ne 2
 692 .na
 693 \fBbackward-delete-word\fR
 694 .ad
 695 .RS 30n
 696 Delete the word which precedes the cursor.
 697 .RE
 698 
 699 .sp
 700 .ne 2
 701 .na
 702 \fBupcase-word\fR
 703 .ad
 704 .RS 30n
 705 Convert all of the characters of the word which follows the cursor, to upper
 706 case.
 707 .RE
 708 
 709 .sp
 710 .ne 2
 711 .na
 712 \fBdowncase-word\fR
 713 .ad
 714 .RS 30n
 715 Convert all of the characters of the word which follows the cursor, to lower
 716 case.
 717 .RE
 718 
 719 .sp
 720 .ne 2
 721 .na
 722 \fBcapitalize-word\fR
 723 .ad
 724 .RS 30n
 725 Capitalize the word which follows the cursor.
 726 .RE
 727 
 728 .sp
 729 .ne 2
 730 .na
 731 \fBchange-case\fR
 732 .ad
 733 .RS 30n
 734 If the next character is upper case, toggle it to lower case and vice versa.
 735 .RE
 736 
 737 .sp
 738 .ne 2
 739 .na
 740 \fBredisplay\fR
 741 .ad
 742 .RS 30n
 743 Redisplay the line.
 744 .RE
 745 
 746 .sp
 747 .ne 2
 748 .na
 749 \fBclear-screen\fR
 750 .ad
 751 .RS 30n
 752 Clear the terminal, then redisplay the current line.
 753 .RE
 754 
 755 .sp
 756 .ne 2
 757 .na
 758 \fBtranspose-chars\fR
 759 .ad
 760 .RS 30n
 761 Swap the character under the cursor with the character just before the cursor.
 762 .RE
 763 
 764 .sp
 765 .ne 2
 766 .na
 767 \fBset-mark\fR
 768 .ad
 769 .RS 30n
 770 Set a mark at the position of the cursor.
 771 .RE
 772 
 773 .sp
 774 .ne 2
 775 .na
 776 \fBexchange-point-and-mark\fR
 777 .ad
 778 .RS 30n
 779 Move the cursor to the last mark that was set, and move the mark to where the
 780 cursor used to be.
 781 .RE
 782 
 783 .sp
 784 .ne 2
 785 .na
 786 \fBkill-region\fR
 787 .ad
 788 .RS 30n
 789 Delete the characters that lie between the last mark that was set, and the
 790 cursor.
 791 .RE
 792 
 793 .sp
 794 .ne 2
 795 .na
 796 \fBcopy-region-as-kill\fR
 797 .ad
 798 .RS 30n
 799 Copy the text between the mark and the cursor to the cut buffer, without
 800 deleting the original text.
 801 .RE
 802 
 803 .sp
 804 .ne 2
 805 .na
 806 \fByank\fR
 807 .ad
 808 .RS 30n
 809 Insert the text that was last deleted, just before the current position of the
 810 cursor.
 811 .RE
 812 
 813 .sp
 814 .ne 2
 815 .na
 816 \fBappend-yank\fR
 817 .ad
 818 .RS 30n
 819 Paste the current contents of the cut buffer, after the cursor.
 820 .RE
 821 
 822 .sp
 823 .ne 2
 824 .na
 825 \fBup-history\fR
 826 .ad
 827 .RS 30n
 828 Recall the next oldest line that was entered. Note that in \fBvi\fR mode you
 829 are left in command mode.
 830 .RE
 831 
 832 .sp
 833 .ne 2
 834 .na
 835 \fBdown-history\fR
 836 .ad
 837 .RS 30n
 838 Recall the next most recent line that was entered. If no history recall session
 839 is currently active, the next line from a previous recall session is recalled.
 840 Note that in vi mode you are left in command mode.
 841 .RE
 842 
 843 .sp
 844 .ne 2
 845 .na
 846 \fBhistory-search-backward\fR
 847 .ad
 848 .RS 30n
 849 Recall the next oldest line who's prefix matches the string which currently
 850 precedes the cursor (in \fBvi\fR command-mode the character under the cursor is
 851 also included in the search string). Note that in \fBvi\fR mode you are left in
 852 command mode.
 853 .RE
 854 
 855 .sp
 856 .ne 2
 857 .na
 858 \fBhistory-search-forward\fR
 859 .ad
 860 .RS 30n
 861 Recall the next newest line who's prefix matches the string which currently
 862 precedes the cursor (in \fBvi\fR command-mode the character under the cursor is
 863 also included in the search string). Note that in \fBvi\fR mode you are left in
 864 command mode.
 865 .RE
 866 
 867 .sp
 868 .ne 2
 869 .na
 870 \fBhistory-re-search-backward\fR
 871 .ad
 872 .RS 30n
 873 Recall the next oldest line who's prefix matches that established by the last
 874 invocation of either history-search-forward or history-search-backward.
 875 .RE
 876 
 877 .sp
 878 .ne 2
 879 .na
 880 \fBhistory-re-search-forward\fR
 881 .ad
 882 .RS 30n
 883 Recall the next newest line who's prefix matches that established by the last
 884 invocation of either history-search-forward or history-search-backward.
 885 .RE
 886 
 887 .sp
 888 .ne 2
 889 .na
 890 \fBcomplete-word\fR
 891 .ad
 892 .RS 30n
 893 Attempt to complete the incomplete word which precedes the cursor. Unless the
 894 host program has customized word completion, file name completion is attempted.
 895 In \fBvi\fR commmand mode the character under the cursor is also included in
 896 the word being completed, and you are left in \fBvi\fR insert mode.
 897 .RE
 898 
 899 .sp
 900 .ne 2
 901 .na
 902 \fBexpand-filename\fR
 903 .ad
 904 .RS 30n
 905 Within the command line, expand wild cards, tilde expressions and dollar
 906 expressions in the file name which immediately precedes the cursor. In \fBvi\fR
 907 commmand mode the character under the cursor is also included in the file name
 908 being expanded, and you are left in \fBvi\fR insert mode.
 909 .RE
 910 
 911 .sp
 912 .ne 2
 913 .na
 914 \fBlist-glob\fR
 915 .ad
 916 .RS 30n
 917 List any file names which match the wild-card, tilde and dollar expressions in
 918 the file name which immediately precedes the cursor, then redraw the input line
 919 unchanged.
 920 .RE
 921 
 922 .sp
 923 .ne 2
 924 .na
 925 \fBlist-history\fR
 926 .ad
 927 .RS 30n
 928 Display the contents of the history list for the current history group. If a
 929 repeat count of \fB> 1\fR is specified, only that many of the most recent lines
 930 are displayed. See the Entering Repeat Counts section.
 931 .RE
 932 
 933 .sp
 934 .ne 2
 935 .na
 936 \fBread-from-file\fR
 937 .ad
 938 .RS 30n
 939 Temporarily switch to reading input from the file who's name precedes the
 940 cursor.
 941 .RE
 942 
 943 .sp
 944 .ne 2
 945 .na
 946 \fBread-init-files\fR
 947 .ad
 948 .RS 30n
 949 Re-read \fBteclarc\fR configuration files.
 950 .RE
 951 
 952 .sp
 953 .ne 2
 954 .na
 955 \fBbeginning-of-history\fR
 956 .ad
 957 .RS 30n
 958 Move to the oldest line in the history list. Note that in \fBvi\fR mode you are
 959 left in command mode.
 960 .RE
 961 
 962 .sp
 963 .ne 2
 964 .na
 965 \fBend-of-history\fR
 966 .ad
 967 .RS 30n
 968 Move to the newest line in the history list (ie. the current line). Note that
 969 in \fBvi\fR mode this leaves you in command mode.
 970 .RE
 971 
 972 .sp
 973 .ne 2
 974 .na
 975 \fBdigit-argument\fR
 976 .ad
 977 .RS 30n
 978 Enter a repeat count for the next key binding function. For details, see the
 979 Entering Repeat Counts section.
 980 .RE
 981 
 982 .sp
 983 .ne 2
 984 .na
 985 \fBnewline\fR
 986 .ad
 987 .RS 30n
 988 Terminate and return the current contents of the line, after appending a
 989 newline character. The newline character is normally '\n', but will be the
 990 first character of the key sequence that invoked the newline action, if this
 991 happens to be a printable character. If the action was invoked by the '\n'
 992 newline character or the '\r' carriage return character, the line is appended
 993 to the history buffer.
 994 .RE
 995 
 996 .sp
 997 .ne 2
 998 .na
 999 \fBrepeat-history\fR
1000 .ad
1001 .RS 30n
1002 Return the line that is being edited, then arrange for the next most recent
1003 entry in the history buffer to be recalled when tecla is next called.
1004 Repeatedly invoking this action causes successive historical input lines to be
1005 re-executed. Note that this action is equivalent to the 'Operate' action in
1006 ksh.
1007 .RE
1008 
1009 .sp
1010 .ne 2
1011 .na
1012 \fBring-bell\fR
1013 .ad
1014 .RS 30n
1015 Ring the terminal bell, unless the bell has been silenced via the nobeep
1016 configuration option (see The Tecla Configuration File section).
1017 .RE
1018 
1019 .sp
1020 .ne 2
1021 .na
1022 \fBforward-copy-char\fR
1023 .ad
1024 .RS 30n
1025 Copy the next character into the cut buffer (NB. use repeat counts to copy more
1026 than one).
1027 .RE
1028 
1029 .sp
1030 .ne 2
1031 .na
1032 \fBbackward-copy-char\fR
1033 .ad
1034 .RS 30n
1035 Copy the previous character into the cut buffer.
1036 .RE
1037 
1038 .sp
1039 .ne 2
1040 .na
1041 \fBforward-copy-word\fR
1042 .ad
1043 .RS 30n
1044 Copy the next word into the cut buffer.
1045 .RE
1046 
1047 .sp
1048 .ne 2
1049 .na
1050 \fBbackward-copy-word\fR
1051 .ad
1052 .RS 30n
1053 Copy the previous word into the cut buffer.
1054 .RE
1055 
1056 .sp
1057 .ne 2
1058 .na
1059 \fBforward-find-char\fR
1060 .ad
1061 .RS 30n
1062 Move the cursor to the next occurrence of the next character that you type.
1063 .RE
1064 
1065 .sp
1066 .ne 2
1067 .na
1068 \fBbackward-find-char\fR
1069 .ad
1070 .RS 30n
1071 Move the cursor to the last occurrence of the next character that you type.
1072 .RE
1073 
1074 .sp
1075 .ne 2
1076 .na
1077 \fBforward-to-char\fR
1078 .ad
1079 .RS 30n
1080 Move the cursor to the character just before the next occurrence of the next
1081 character that the user types.
1082 .RE
1083 
1084 .sp
1085 .ne 2
1086 .na
1087 \fBbackward-to-char\fR
1088 .ad
1089 .RS 30n
1090 Move the cursor to the character just after the last occurrence before the
1091 cursor of the next character that the user types.
1092 .RE
1093 
1094 .sp
1095 .ne 2
1096 .na
1097 \fBrepeat-find-char\fR
1098 .ad
1099 .RS 30n
1100 Repeat the last backward-find-char, forward-find-char, backward-to-char or
1101 forward-to-char.
1102 .RE
1103 
1104 .sp
1105 .ne 2
1106 .na
1107 \fBinvert-refind-char\fR
1108 .ad
1109 .RS 30n
1110 Repeat the last backward-find-char, forward-find-char, backward-to-char, or
1111 forward-to-char in the opposite direction.
1112 .RE
1113 
1114 .sp
1115 .ne 2
1116 .na
1117 \fBdelete-to-column\fR
1118 .ad
1119 .RS 30n
1120 Delete the characters from the cursor up to the column that is specified by the
1121 repeat count.
1122 .RE
1123 
1124 .sp
1125 .ne 2
1126 .na
1127 \fBdelete-to-parenthesis\fR
1128 .ad
1129 .RS 30n
1130 Delete the characters from the cursor up to and including the matching
1131 parenthesis, or next close parenthesis.
1132 .RE
1133 
1134 .sp
1135 .ne 2
1136 .na
1137 \fBforward-delete-find\fR
1138 .ad
1139 .RS 30n
1140 Delete the characters from the cursor up to and including the following
1141 occurence of the next character typed.
1142 .RE
1143 
1144 .sp
1145 .ne 2
1146 .na
1147 \fBbackward-delete-find\fR
1148 .ad
1149 .RS 30n
1150 Delete the characters from the cursor up to and including the preceding
1151 occurence of the next character typed.
1152 .RE
1153 
1154 .sp
1155 .ne 2
1156 .na
1157 \fBforward-delete-to\fR
1158 .ad
1159 .RS 30n
1160 Delete the characters from the cursor up to, but not including, the following
1161 occurence of the next character typed.
1162 .RE
1163 
1164 .sp
1165 .ne 2
1166 .na
1167 \fBbackward-delete-to\fR
1168 .ad
1169 .RS 30n
1170 Delete the characters from the cursor up to, but not including, the preceding
1171 occurence of the next character typed.
1172 .RE
1173 
1174 .sp
1175 .ne 2
1176 .na
1177 \fBdelete-refind\fR
1178 .ad
1179 .RS 30n
1180 Repeat the last *-delete-find or *-delete-to action.
1181 .RE
1182 
1183 .sp
1184 .ne 2
1185 .na
1186 \fBdelete-invert-refind\fR
1187 .ad
1188 .RS 30n
1189 Repeat the last *-delete-find or *-delete-to action, in the opposite direction.
1190 .RE
1191 
1192 .sp
1193 .ne 2
1194 .na
1195 \fBcopy-to-column\fR
1196 .ad
1197 .RS 30n
1198 Copy the characters from the cursor up to the column that is specified by the
1199 repeat count, into the cut buffer.
1200 .RE
1201 
1202 .sp
1203 .ne 2
1204 .na
1205 \fBcopy-to-parenthesis\fR
1206 .ad
1207 .RS 30n
1208 Copy the characters from the cursor up to and including the matching
1209 parenthesis, or next close parenthesis, into the cut buffer.
1210 .RE
1211 
1212 .sp
1213 .ne 2
1214 .na
1215 \fBforward-copy-find\fR
1216 .ad
1217 .RS 30n
1218 Copy the characters from the cursor up to and including the following occurence
1219 of the next character typed, into the cut buffer.
1220 .RE
1221 
1222 .sp
1223 .ne 2
1224 .na
1225 \fBbackward-copy-find\fR
1226 .ad
1227 .RS 30n
1228 Copy the characters from the cursor up to and including the preceding occurence
1229 of the next character typed, into the cut buffer.
1230 .RE
1231 
1232 .sp
1233 .ne 2
1234 .na
1235 \fBforward-copy-to\fR
1236 .ad
1237 .RS 30n
1238 Copy the characters from the cursor up to, but not including, the following
1239 occurence of the next character typed, into the cut buffer.
1240 .RE
1241 
1242 .sp
1243 .ne 2
1244 .na
1245 \fBbackward-copy-to\fR
1246 .ad
1247 .RS 30n
1248 Copy the characters from the cursor up to, but not including, the preceding
1249 occurence of the next character typed, into the cut buffer.
1250 .RE
1251 
1252 .sp
1253 .ne 2
1254 .na
1255 \fBcopy-refind\fR
1256 .ad
1257 .RS 30n
1258 Repeat the last *-copy-find or *-copy-to action.
1259 .RE
1260 
1261 .sp
1262 .ne 2
1263 .na
1264 \fBcopy-invert-refind\fR
1265 .ad
1266 .RS 30n
1267 Repeat the last *-copy-find or *-copy-to action, in the opposite direction.
1268 .RE
1269 
1270 .sp
1271 .ne 2
1272 .na
1273 \fBvi-mode\fR
1274 .ad
1275 .RS 30n
1276 Switch to \fBvi\fR mode from emacs mode.
1277 .RE
1278 
1279 .sp
1280 .ne 2
1281 .na
1282 \fBemacs-mode\fR
1283 .ad
1284 .RS 30n
1285 Switch to \fBemacs\fR mode from \fBvi\fR mode.
1286 .RE
1287 
1288 .sp
1289 .ne 2
1290 .na
1291 \fBvi-insert\fR
1292 .ad
1293 .RS 30n
1294 From \fBvi\fR command mode, switch to insert mode.
1295 .RE
1296 
1297 .sp
1298 .ne 2
1299 .na
1300 \fBvi-overwrite\fR
1301 .ad
1302 .RS 30n
1303 From \fBvi\fR command mode, switch to overwrite mode.
1304 .RE
1305 
1306 .sp
1307 .ne 2
1308 .na
1309 \fBvi-insert-at-bol\fR
1310 .ad
1311 .RS 30n
1312 From \fBvi\fR command mode, move the cursor to the start of the line and switch
1313 to insert mode.
1314 .RE
1315 
1316 .sp
1317 .ne 2
1318 .na
1319 \fBvi-append-at-eol\fR
1320 .ad
1321 .RS 30n
1322 From \fBvi\fR command mode, move the cursor to the end of the line and switch
1323 to append mode.
1324 .RE
1325 
1326 .sp
1327 .ne 2
1328 .na
1329 \fBvi-append\fR
1330 .ad
1331 .RS 30n
1332 From \fBvi\fR command mode, move the cursor one position right, and switch to
1333 insert mode.
1334 .RE
1335 
1336 .sp
1337 .ne 2
1338 .na
1339 \fBvi-replace-char\fR
1340 .ad
1341 .RS 30n
1342 From \fBvi\fR command mode, replace the character under the cursor with the
1343 next character entered.
1344 .RE
1345 
1346 .sp
1347 .ne 2
1348 .na
1349 \fBvi-forward-change-char\fR
1350 .ad
1351 .RS 30n
1352 From \fBvi\fR command mode, delete the next character then enter insert mode.
1353 .RE
1354 
1355 .sp
1356 .ne 2
1357 .na
1358 \fBvi-backward-change-char\fR
1359 .ad
1360 .RS 30n
1361 From vi command mode, delete the preceding character then enter insert mode.
1362 .RE
1363 
1364 .sp
1365 .ne 2
1366 .na
1367 \fBvi-forward-change-word\fR
1368 .ad
1369 .RS 30n
1370 From \fBvi\fR command mode, delete the next word then enter insert mode.
1371 .RE
1372 
1373 .sp
1374 .ne 2
1375 .na
1376 \fBvi-backward-change-word\fR
1377 .ad
1378 .RS 30n
1379 From vi command mode, delete the preceding word then enter insert mode.
1380 .RE
1381 
1382 .sp
1383 .ne 2
1384 .na
1385 \fBvi-change-rest-of-line\fR
1386 .ad
1387 .RS 30n
1388 From \fBvi\fR command mode, delete from the cursor to the end of the line, then
1389 enter insert mode.
1390 .RE
1391 
1392 .sp
1393 .ne 2
1394 .na
1395 \fBvi-change-line\fR
1396 .ad
1397 .RS 30n
1398 From \fBvi\fR command mode, delete the current line, then enter insert mode.
1399 .RE
1400 
1401 .sp
1402 .ne 2
1403 .na
1404 \fBvi-change-to-bol\fR
1405 .ad
1406 .RS 30n
1407 From \fBvi\fR command mode, delete all characters between the cursor and the
1408 beginning of the line, then enter insert mode.
1409 .RE
1410 
1411 .sp
1412 .ne 2
1413 .na
1414 \fBvi-change-to-column\fR
1415 .ad
1416 .RS 30n
1417 From \fBvi\fR command mode, delete the characters from the cursor up to the
1418 column that is specified by the repeat count, then enter insert mode.
1419 .RE
1420 
1421 .sp
1422 .ne 2
1423 .na
1424 \fBvi-change-to-parenthesis\fR
1425 .ad
1426 .RS 30n
1427 Delete the characters from the cursor up to and including the matching
1428 parenthesis, or next close parenthesis, then enter \fBvi\fR insert mode.
1429 .RE
1430 
1431 .sp
1432 .ne 2
1433 .na
1434 \fBvi-forward-change-find\fR
1435 .ad
1436 .RS 30n
1437 From \fBvi\fR command mode, delete the characters from the cursor up to and
1438 including the following occurence of the next character typed, then enter
1439 insert mode.
1440 .RE
1441 
1442 .sp
1443 .ne 2
1444 .na
1445 \fBvi-backward-change-find\fR
1446 .ad
1447 .RS 30n
1448 From vi command mode, delete the characters from the cursor up to and including
1449 the preceding occurence of the next character typed, then enter insert mode.
1450 .RE
1451 
1452 .sp
1453 .ne 2
1454 .na
1455 \fBvi-forward-change-to\fR
1456 .ad
1457 .RS 30n
1458 From \fBvi\fR command mode, delete the characters from the cursor up to, but
1459 not including, the following occurence of the next character typed, then enter
1460 insert mode.
1461 .RE
1462 
1463 .sp
1464 .ne 2
1465 .na
1466 \fBvi-backward-change-to\fR
1467 .ad
1468 .RS 30n
1469 From \fBvi\fR command mode, delete the characters from the cursor up to, but
1470 not including, the preceding occurence of the next character typed, then enter
1471 insert mode.
1472 .RE
1473 
1474 .sp
1475 .ne 2
1476 .na
1477 \fBvi-change-refind\fR
1478 .ad
1479 .RS 30n
1480 Repeat the last vi-*-change-find or vi-*-change-to action.
1481 .RE
1482 
1483 .sp
1484 .ne 2
1485 .na
1486 \fBvi-change-invert-refind\fR
1487 .ad
1488 .RS 30n
1489 Repeat the last vi-*-change-find or vi-*-change-to action, in the opposite
1490 direction.
1491 .RE
1492 
1493 .sp
1494 .ne 2
1495 .na
1496 \fBvi-undo\fR
1497 .ad
1498 .RS 30n
1499 In \fBvi\fR mode, undo the last editing operation.
1500 .RE
1501 
1502 .sp
1503 .ne 2
1504 .na
1505 \fBvi-repeat-change\fR
1506 .ad
1507 .RS 30n
1508 In \fBvi\fR command mode, repeat the last command that modified the line.
1509 .RE
1510 
1511 .SS "Default Key Bindings In \fBemacs\fR Mode"
1512 .sp
1513 .LP
1514 The following default key bindings, which can be overriden by the tecla
1515 configuration file, are designed to mimic most of the bindings of the unix
1516 \fBtcsh shell\fR shell, when it is in \fBemacs\fR editing mode.
1517 .sp
1518 .LP
1519 This is the default editing mode of the tecla library.
1520 .sp
1521 .LP
1522 Under UNIX the terminal driver sets a number of special keys for certain
1523 functions. The tecla library attempts to use the same key bindings to maintain
1524 consistency. The key sequences shown for the following 6 bindings are thus just
1525 examples of what they will probably be set to. If you have used the stty
1526 command to change these keys, then the default bindings should match.
1527 .sp
1528 .ne 2
1529 .na
1530 \fB\fB^C\fR\fR
1531 .ad
1532 .RS 6n
1533 user-interrupt
1534 .RE
1535 
1536 .sp
1537 .ne 2
1538 .na
1539 \fB\fB^\\fR\fR
1540 .ad
1541 .RS 6n
1542 abort
1543 .RE
1544 
1545 .sp
1546 .ne 2
1547 .na
1548 \fB\fB^Z\fR\fR
1549 .ad
1550 .RS 6n
1551 suspend
1552 .RE
1553 
1554 .sp
1555 .ne 2
1556 .na
1557 \fB\fB^Q\fR\fR
1558 .ad
1559 .RS 6n
1560 start-output
1561 .RE
1562 
1563 .sp
1564 .ne 2
1565 .na
1566 \fB\fB^S\fR\fR
1567 .ad
1568 .RS 6n
1569 stop-output
1570 .RE
1571 
1572 .sp
1573 .ne 2
1574 .na
1575 \fB\fB^V\fR\fR
1576 .ad
1577 .RS 6n
1578 literal-next
1579 .RE
1580 
1581 .sp
1582 .LP
1583 The cursor keys are refered to by name, as follows. This is necessary because
1584 different types of terminals generate different key sequences when their cursor
1585 keys are pressed.
1586 .sp
1587 .ne 2
1588 .na
1589 \fBright\fR
1590 .ad
1591 .RS 9n
1592 cursor-right
1593 .RE
1594 
1595 .sp
1596 .ne 2
1597 .na
1598 \fBleft\fR
1599 .ad
1600 .RS 9n
1601 cursor-left
1602 .RE
1603 
1604 .sp
1605 .ne 2
1606 .na
1607 \fBup\fR
1608 .ad
1609 .RS 9n
1610 up-history
1611 .RE
1612 
1613 .sp
1614 .ne 2
1615 .na
1616 \fBdown\fR
1617 .ad
1618 .RS 9n
1619 down-history
1620 .RE
1621 
1622 .sp
1623 .LP
1624 The remaining bindings don't depend on the terminal setttings.
1625 .sp
1626 .ne 2
1627 .na
1628 \fB\fB^F\fR\fR
1629 .ad
1630 .RS 21n
1631 cursor-right
1632 .RE
1633 
1634 .sp
1635 .ne 2
1636 .na
1637 \fB\fB^B\fR\fR
1638 .ad
1639 .RS 21n
1640 cursor-left
1641 .RE
1642 
1643 .sp
1644 .ne 2
1645 .na
1646 \fB\fBM-i\fR\fR
1647 .ad
1648 .RS 21n
1649 insert-mode
1650 .RE
1651 
1652 .sp
1653 .ne 2
1654 .na
1655 \fB\fB^A\fR\fR
1656 .ad
1657 .RS 21n
1658 beginning-of-line
1659 .RE
1660 
1661 .sp
1662 .ne 2
1663 .na
1664 \fB\fB^E\fR\fR
1665 .ad
1666 .RS 21n
1667 end-of-line
1668 .RE
1669 
1670 .sp
1671 .ne 2
1672 .na
1673 \fB\fB^U\fR\fR
1674 .ad
1675 .RS 21n
1676 delete-line
1677 .RE
1678 
1679 .sp
1680 .ne 2
1681 .na
1682 \fB\fB^K\fR\fR
1683 .ad
1684 .RS 21n
1685 kill-line
1686 .RE
1687 
1688 .sp
1689 .ne 2
1690 .na
1691 \fB\fBM-f\fR\fR
1692 .ad
1693 .RS 21n
1694 forward-word
1695 .RE
1696 
1697 .sp
1698 .ne 2
1699 .na
1700 \fB\fBM-b\fR\fR
1701 .ad
1702 .RS 21n
1703 backward-word
1704 .RE
1705 
1706 .sp
1707 .ne 2
1708 .na
1709 \fB\fB^D\fR\fR
1710 .ad
1711 .RS 21n
1712 del-char-or-list-or-eof
1713 .RE
1714 
1715 .sp
1716 .ne 2
1717 .na
1718 \fB\fB^H\fR\fR
1719 .ad
1720 .RS 21n
1721 backward-delete-char
1722 .RE
1723 
1724 .sp
1725 .ne 2
1726 .na
1727 \fB\fB^?\fR\fR
1728 .ad
1729 .RS 21n
1730 backward-delete-char
1731 .RE
1732 
1733 .sp
1734 .ne 2
1735 .na
1736 \fB\fBM-d\fR\fR
1737 .ad
1738 .RS 21n
1739 forward-delete-word
1740 .RE
1741 
1742 .sp
1743 .ne 2
1744 .na
1745 \fB\fBM-^H\fR\fR
1746 .ad
1747 .RS 21n
1748 backward-delete-word
1749 .RE
1750 
1751 .sp
1752 .ne 2
1753 .na
1754 \fB\fBM-^?\fR\fR
1755 .ad
1756 .RS 21n
1757 backward-delete-word
1758 .RE
1759 
1760 .sp
1761 .ne 2
1762 .na
1763 \fB\fBM-u\fR\fR
1764 .ad
1765 .RS 21n
1766 upcase-word
1767 .RE
1768 
1769 .sp
1770 .ne 2
1771 .na
1772 \fB\fBM-l\fR\fR
1773 .ad
1774 .RS 21n
1775 downcase-word
1776 .RE
1777 
1778 .sp
1779 .ne 2
1780 .na
1781 \fB\fBM-c\fR\fR
1782 .ad
1783 .RS 21n
1784 capitalize-word
1785 .RE
1786 
1787 .sp
1788 .ne 2
1789 .na
1790 \fB\fB^R\fR\fR
1791 .ad
1792 .RS 21n
1793 redisplay
1794 .RE
1795 
1796 .sp
1797 .ne 2
1798 .na
1799 \fB\fB^L\fR\fR
1800 .ad
1801 .RS 21n
1802 clear-screen
1803 .RE
1804 
1805 .sp
1806 .ne 2
1807 .na
1808 \fB\fB^T\fR\fR
1809 .ad
1810 .RS 21n
1811 transpose-chars
1812 .RE
1813 
1814 .sp
1815 .ne 2
1816 .na
1817 \fB\fB^@\fR\fR
1818 .ad
1819 .RS 21n
1820 set-mark
1821 .RE
1822 
1823 .sp
1824 .ne 2
1825 .na
1826 \fB\fB^X^X\fR\fR
1827 .ad
1828 .RS 21n
1829 exchange-point-and-mark
1830 .RE
1831 
1832 .sp
1833 .ne 2
1834 .na
1835 \fB\fB^W\fR\fR
1836 .ad
1837 .RS 21n
1838 kill-region
1839 .RE
1840 
1841 .sp
1842 .ne 2
1843 .na
1844 \fB\fBM-w\fR\fR
1845 .ad
1846 .RS 21n
1847 copy-region-as-kill
1848 .RE
1849 
1850 .sp
1851 .ne 2
1852 .na
1853 \fB\fB^Y\fR\fR
1854 .ad
1855 .RS 21n
1856 yank
1857 .RE
1858 
1859 .sp
1860 .ne 2
1861 .na
1862 \fB\fB^P\fR\fR
1863 .ad
1864 .RS 21n
1865 up-history
1866 .RE
1867 
1868 .sp
1869 .ne 2
1870 .na
1871 \fB\fB^N\fR\fR
1872 .ad
1873 .RS 21n
1874 down-history
1875 .RE
1876 
1877 .sp
1878 .ne 2
1879 .na
1880 \fB\fBM-p\fR\fR
1881 .ad
1882 .RS 21n
1883 history-search-backward
1884 .RE
1885 
1886 .sp
1887 .ne 2
1888 .na
1889 \fB\fBM-n\fR\fR
1890 .ad
1891 .RS 21n
1892 history-search-forward
1893 .RE
1894 
1895 .sp
1896 .ne 2
1897 .na
1898 \fB\fB^I\fR\fR
1899 .ad
1900 .RS 21n
1901 complete-word
1902 .RE
1903 
1904 .sp
1905 .ne 2
1906 .na
1907 \fB\fB^X*\fR\fR
1908 .ad
1909 .RS 21n
1910 expand-filename
1911 .RE
1912 
1913 .sp
1914 .ne 2
1915 .na
1916 \fB\fB^X^F\fR\fR
1917 .ad
1918 .RS 21n
1919 read-from-file
1920 .RE
1921 
1922 .sp
1923 .ne 2
1924 .na
1925 \fB\fB^X^R\fR\fR
1926 .ad
1927 .RS 21n
1928 read-init-files
1929 .RE
1930 
1931 .sp
1932 .ne 2
1933 .na
1934 \fB\fB^Xg\fR\fR
1935 .ad
1936 .RS 21n
1937 list-glob
1938 .RE
1939 
1940 .sp
1941 .ne 2
1942 .na
1943 \fB\fB^Xh\fR\fR
1944 .ad
1945 .RS 21n
1946 list-history
1947 .RE
1948 
1949 .sp
1950 .ne 2
1951 .na
1952 \fB\fBM-<\fR\fR
1953 .ad
1954 .RS 21n
1955 beginning-of-history
1956 .RE
1957 
1958 .sp
1959 .ne 2
1960 .na
1961 \fB\fBM->\fR\fR
1962 .ad
1963 .RS 21n
1964 end-of-history
1965 .RE
1966 
1967 .sp
1968 .ne 2
1969 .na
1970 \fB\fB\n\fR\fR
1971 .ad
1972 .RS 21n
1973 newline
1974 .RE
1975 
1976 .sp
1977 .ne 2
1978 .na
1979 \fB\fB\r\fR\fR
1980 .ad
1981 .RS 21n
1982 newline
1983 .RE
1984 
1985 .sp
1986 .ne 2
1987 .na
1988 \fB\fBM-o\fR\fR
1989 .ad
1990 .RS 21n
1991 repeat-history
1992 .RE
1993 
1994 .sp
1995 .ne 2
1996 .na
1997 \fB\fBM-^V\fR\fR
1998 .ad
1999 .RS 21n
2000 \fBvi\fR-mode
2001 .RE
2002 
2003 .sp
2004 .ne 2
2005 .na
2006 \fB\fBM-0, M-1, ... M-9\fR\fR
2007 .ad
2008 .RS 21n
2009 digit-argument (see below)
2010 .RE
2011 
2012 .sp
2013 .LP
2014 Note that \fB^I\fR is what the TAB key generates, and that \fB^@\fR can be
2015 generated not only by pressing the CONTROL key and the @ key simultaneously,
2016 but also by pressing the CONTROL key and the space bar at the same time.
2017 .SS "Default Key Bindings in \fBvi\fR Mode"
2018 .sp
2019 .LP
2020 The following default key bindings are designed to mimic the \fBvi\fR style of
2021 editing as closely as possible. This means that very few editing functions are
2022 provided in the initial character input mode, editing functions instead being
2023 provided by the \fBvi\fR command mode. The \fBvi\fR command mode is entered
2024 whenever the ESCAPE character is pressed, or whenever a key sequence that
2025 starts with a meta character is entered. In addition to mimicing \fBvi\fR,
2026 \fBlibtecla\fR provides bindings for tab completion, wild-card expansion of
2027 file names, and historical line recall.
2028 .sp
2029 .LP
2030 To learn how to tell the tecla library to use \fBvi\fR mode instead of the
2031 default \fBemacs\fR editing mode, see the earlier section entitled The Tecla
2032 Configuration File.
2033 .sp
2034 .LP
2035 Under UNIX the terminal driver sets a number of special keys for certain
2036 functions. The tecla library attempts to use the same key bindings to maintain
2037 consistency, binding them both in input mode and in command mode. The key
2038 sequences shown for the following 6 bindings are thus just examples of what
2039 they will probably be set to. If you have used the \fBstty\fR command to change
2040 these keys, then the default bindings should match.
2041 .sp
2042 .ne 2
2043 .na
2044 \fB\fB^C\fR\fR
2045 .ad
2046 .RS 8n
2047 user-interrupt
2048 .RE
2049 
2050 .sp
2051 .ne 2
2052 .na
2053 \fB\fB^\\fR\fR
2054 .ad
2055 .RS 8n
2056 abort
2057 .RE
2058 
2059 .sp
2060 .ne 2
2061 .na
2062 \fB\fB^Z\fR\fR
2063 .ad
2064 .RS 8n
2065 suspend
2066 .RE
2067 
2068 .sp
2069 .ne 2
2070 .na
2071 \fB\fB^Q\fR\fR
2072 .ad
2073 .RS 8n
2074 start-output
2075 .RE
2076 
2077 .sp
2078 .ne 2
2079 .na
2080 \fB\fB^S\fR\fR
2081 .ad
2082 .RS 8n
2083 stop-output
2084 .RE
2085 
2086 .sp
2087 .ne 2
2088 .na
2089 \fB\fB^V\fR\fR
2090 .ad
2091 .RS 8n
2092 literal-next
2093 .RE
2094 
2095 .sp
2096 .ne 2
2097 .na
2098 \fB\fBM-^C\fR\fR
2099 .ad
2100 .RS 8n
2101 user-interrupt
2102 .RE
2103 
2104 .sp
2105 .ne 2
2106 .na
2107 \fB\fBM-^\\fR\fR
2108 .ad
2109 .RS 8n
2110 abort
2111 .RE
2112 
2113 .sp
2114 .ne 2
2115 .na
2116 \fB\fBM-^Z\fR\fR
2117 .ad
2118 .RS 8n
2119 suspend
2120 .RE
2121 
2122 .sp
2123 .ne 2
2124 .na
2125 \fB\fBM-^Q\fR\fR
2126 .ad
2127 .RS 8n
2128 start-output
2129 .RE
2130 
2131 .sp
2132 .ne 2
2133 .na
2134 \fB\fBM-^S\fR\fR
2135 .ad
2136 .RS 8n
2137 stop-output
2138 .RE
2139 
2140 .sp
2141 .LP
2142 Note that above, most of the bindings are defined twice, once as a raw control
2143 code like \fB^C\fR and then a second time as a META character like \fBM-^C\fR.
2144 The former is the binding for \fBvi\fR input mode, whereas the latter is the
2145 binding for \fBvi\fR command mode. Once in command mode all key sequences that
2146 the user types that they don't explicitly start with an ESCAPE or a META key,
2147 have their first key secretly converted to a META character before the key
2148 sequence is looked up in the key binding table. Thus, once in command mode,
2149 when you type the letter i, for example, the tecla library actually looks up
2150 the binding for \fBM-i\fR.
2151 .sp
2152 .LP
2153 The cursor keys are refered to by name, as follows. This is necessary because
2154 different types of terminals generate different key sequences when their cursor
2155 keys are pressed.
2156 .sp
2157 .ne 2
2158 .na
2159 \fB\fBright\fR\fR
2160 .ad
2161 .RS 9n
2162 cursor-right
2163 .RE
2164 
2165 .sp
2166 .ne 2
2167 .na
2168 \fB\fBleft\fR\fR
2169 .ad
2170 .RS 9n
2171 cursor-left
2172 .RE
2173 
2174 .sp
2175 .ne 2
2176 .na
2177 \fB\fBup\fR\fR
2178 .ad
2179 .RS 9n
2180 up-history
2181 .RE
2182 
2183 .sp
2184 .ne 2
2185 .na
2186 \fB\fBdown\fR\fR
2187 .ad
2188 .RS 9n
2189 down-history
2190 .RE
2191 
2192 .sp
2193 .LP
2194 The cursor keys normally generate a key sequence that start with an ESCAPE
2195 character, so beware that using the arrow keys will put you into command mode
2196 (if you aren't already in command mode).
2197 .sp
2198 .LP
2199 The following are the terminal-independent key bindings for \fBvi\fR input
2200 mode.
2201 .sp
2202 .ne 2
2203 .na
2204 \fB\fB^D\fR\fR
2205 .ad
2206 .RS 8n
2207 list-or-eof
2208 .RE
2209 
2210 .sp
2211 .ne 2
2212 .na
2213 \fB\fB^G\fR\fR
2214 .ad
2215 .RS 8n
2216 list-glob
2217 .RE
2218 
2219 .sp
2220 .ne 2
2221 .na
2222 \fB\fB^H\fR\fR
2223 .ad
2224 .RS 8n
2225 backward-delete-char
2226 .RE
2227 
2228 .sp
2229 .ne 2
2230 .na
2231 \fB\fB^I\fR\fR
2232 .ad
2233 .RS 8n
2234 complete-word
2235 .RE
2236 
2237 .sp
2238 .ne 2
2239 .na
2240 \fB\fB\r\fR\fR
2241 .ad
2242 .RS 8n
2243 newline
2244 .RE
2245 
2246 .sp
2247 .ne 2
2248 .na
2249 \fB\fB\n\fR\fR
2250 .ad
2251 .RS 8n
2252 newline
2253 .RE
2254 
2255 .sp
2256 .ne 2
2257 .na
2258 \fB\fB^L\fR\fR
2259 .ad
2260 .RS 8n
2261 clear-screen
2262 .RE
2263 
2264 .sp
2265 .ne 2
2266 .na
2267 \fB\fB^N\fR\fR
2268 .ad
2269 .RS 8n
2270 down-history
2271 .RE
2272 
2273 .sp
2274 .ne 2
2275 .na
2276 \fB\fB^P\fR\fR
2277 .ad
2278 .RS 8n
2279 up-history
2280 .RE
2281 
2282 .sp
2283 .ne 2
2284 .na
2285 \fB\fB^R\fR\fR
2286 .ad
2287 .RS 8n
2288 redisplay
2289 .RE
2290 
2291 .sp
2292 .ne 2
2293 .na
2294 \fB\fB^U\fR\fR
2295 .ad
2296 .RS 8n
2297 backward-kill-line
2298 .RE
2299 
2300 .sp
2301 .ne 2
2302 .na
2303 \fB\fB^W\fR\fR
2304 .ad
2305 .RS 8n
2306 backward-delete-word
2307 .RE
2308 
2309 .sp
2310 .ne 2
2311 .na
2312 \fB\fB^X*\fR\fR
2313 .ad
2314 .RS 8n
2315 expand-filename
2316 .RE
2317 
2318 .sp
2319 .ne 2
2320 .na
2321 \fB\fB^X^F\fR\fR
2322 .ad
2323 .RS 8n
2324 read-from-file
2325 .RE
2326 
2327 .sp
2328 .ne 2
2329 .na
2330 \fB\fB^X^R\fR\fR
2331 .ad
2332 .RS 8n
2333 read-init-files
2334 .RE
2335 
2336 .sp
2337 .ne 2
2338 .na
2339 \fB\fB^?\fR\fR
2340 .ad
2341 .RS 8n
2342 backward-delete-char
2343 .RE
2344 
2345 .sp
2346 .LP
2347 The following are the key bindings that are defined in \fBvi\fR command mode,
2348 this being specified by them all starting with a META character. As mentioned
2349 above, once in command mode the initial meta character is optional. For
2350 example, you might enter command mode by typing ESCAPE, and then press 'H'
2351 twice to move the cursor two positions to the left. Both 'H' characters get
2352 quietly converted to \fBM-h\fR before being compared to the key binding table,
2353 the first one because ESCAPE followed by a character is always converted to the
2354 equivalent META character, and the second because command mode was already
2355 active.
2356 .sp
2357 .ne 2
2358 .na
2359 \fB\fBM-\\fR\fR
2360 .ad
2361 .RS 21n
2362 cursor-right (META-space)
2363 .RE
2364 
2365 .sp
2366 .ne 2
2367 .na
2368 \fB\fBM-$\fR\fR
2369 .ad
2370 .RS 21n
2371 end-of-line
2372 .RE
2373 
2374 .sp
2375 .ne 2
2376 .na
2377 \fB\fBM-*\fR\fR
2378 .ad
2379 .RS 21n
2380 expand-filename
2381 .RE
2382 
2383 .sp
2384 .ne 2
2385 .na
2386 \fB\fBM-+\fR\fR
2387 .ad
2388 .RS 21n
2389 down-history
2390 .RE
2391 
2392 .sp
2393 .ne 2
2394 .na
2395 \fB\fBM--\fR\fR
2396 .ad
2397 .RS 21n
2398 up-history
2399 .RE
2400 
2401 .sp
2402 .ne 2
2403 .na
2404 \fB\fBM-<\fR\fR
2405 .ad
2406 .RS 21n
2407 beginning-of-history
2408 .RE
2409 
2410 .sp
2411 .ne 2
2412 .na
2413 \fB\fBM->\fR\fR
2414 .ad
2415 .RS 21n
2416 end-of-history
2417 .RE
2418 
2419 .sp
2420 .ne 2
2421 .na
2422 \fB\fBM-^\fR\fR
2423 .ad
2424 .RS 21n
2425 beginning-of-line
2426 .RE
2427 
2428 .sp
2429 .ne 2
2430 .na
2431 \fB\fBM-\fR\fR
2432 .ad
2433 .RS 21n
2434 repeat-find-char
2435 .RE
2436 
2437 .sp
2438 .ne 2
2439 .na
2440 \fB\fBM-,\fR\fR
2441 .ad
2442 .RS 21n
2443 invert-refind-char
2444 .RE
2445 
2446 .sp
2447 .ne 2
2448 .na
2449 \fB\fBM-|\fR\fR
2450 .ad
2451 .RS 21n
2452 goto-column
2453 .RE
2454 
2455 .sp
2456 .ne 2
2457 .na
2458 \fB\fBM-~\fR\fR
2459 .ad
2460 .RS 21n
2461 change-case
2462 .RE
2463 
2464 .sp
2465 .ne 2
2466 .na
2467 \fB\fBM-.\fR\fR
2468 .ad
2469 .RS 21n
2470 vi-repeat-change
2471 .RE
2472 
2473 .sp
2474 .ne 2
2475 .na
2476 \fB\fBM-%\fR\fR
2477 .ad
2478 .RS 21n
2479 find-parenthesis
2480 .RE
2481 
2482 .sp
2483 .ne 2
2484 .na
2485 \fB\fBM-a\fR\fR
2486 .ad
2487 .RS 21n
2488 vi-append
2489 .RE
2490 
2491 .sp
2492 .ne 2
2493 .na
2494 \fB\fBM-A\fR\fR
2495 .ad
2496 .RS 21n
2497 vi-append-at-eol
2498 .RE
2499 
2500 .sp
2501 .ne 2
2502 .na
2503 \fB\fBM-b\fR\fR
2504 .ad
2505 .RS 21n
2506 backward-word
2507 .RE
2508 
2509 .sp
2510 .ne 2
2511 .na
2512 \fB\fBM-B\fR\fR
2513 .ad
2514 .RS 21n
2515 backward-word
2516 .RE
2517 
2518 .sp
2519 .ne 2
2520 .na
2521 \fB\fBM-C\fR\fR
2522 .ad
2523 .RS 21n
2524 vi-change-rest-of-line
2525 .RE
2526 
2527 .sp
2528 .ne 2
2529 .na
2530 \fB\fBM-cb\fR\fR
2531 .ad
2532 .RS 21n
2533 vi-backward-change-word
2534 .RE
2535 
2536 .sp
2537 .ne 2
2538 .na
2539 \fB\fBM-cB\fR\fR
2540 .ad
2541 .RS 21n
2542 vi-backward-change-word
2543 .RE
2544 
2545 .sp
2546 .ne 2
2547 .na
2548 \fB\fBM-cc\fR\fR
2549 .ad
2550 .RS 21n
2551 vi-change-line
2552 .RE
2553 
2554 .sp
2555 .ne 2
2556 .na
2557 \fB\fBM-ce\fR\fR
2558 .ad
2559 .RS 21n
2560 vi-forward-change-word
2561 .RE
2562 
2563 .sp
2564 .ne 2
2565 .na
2566 \fB\fBM-cE\fR\fR
2567 .ad
2568 .RS 21n
2569 vi-forward-change-word
2570 .RE
2571 
2572 .sp
2573 .ne 2
2574 .na
2575 \fB\fBM-cw\fR\fR
2576 .ad
2577 .RS 21n
2578 vi-forward-change-word
2579 .RE
2580 
2581 .sp
2582 .ne 2
2583 .na
2584 \fB\fBM-cW\fR\fR
2585 .ad
2586 .RS 21n
2587 vi-forward-change-word
2588 .RE
2589 
2590 .sp
2591 .ne 2
2592 .na
2593 \fB\fBM-cF\fR\fR
2594 .ad
2595 .RS 21n
2596 vi-backward-change-find
2597 .RE
2598 
2599 .sp
2600 .ne 2
2601 .na
2602 \fB\fBM-cf\fR\fR
2603 .ad
2604 .RS 21n
2605 vi-forward-change-find
2606 .RE
2607 
2608 .sp
2609 .ne 2
2610 .na
2611 \fB\fBM-cT\fR\fR
2612 .ad
2613 .RS 21n
2614 vi-backward-change-to
2615 .RE
2616 
2617 .sp
2618 .ne 2
2619 .na
2620 \fB\fBM-ct\fR\fR
2621 .ad
2622 .RS 21n
2623 vi-forward-change-to
2624 .RE
2625 
2626 .sp
2627 .ne 2
2628 .na
2629 \fB\fBM-c;\fR\fR
2630 .ad
2631 .RS 21n
2632 vi-change-refind
2633 .RE
2634 
2635 .sp
2636 .ne 2
2637 .na
2638 \fB\fBM-c,\fR\fR
2639 .ad
2640 .RS 21n
2641 vi-change-invert-refind
2642 .RE
2643 
2644 .sp
2645 .ne 2
2646 .na
2647 \fB\fBM-ch\fR\fR
2648 .ad
2649 .RS 21n
2650 vi-backward-change-char
2651 .RE
2652 
2653 .sp
2654 .ne 2
2655 .na
2656 \fB\fBM-c^H\fR\fR
2657 .ad
2658 .RS 21n
2659 vi-backward-change-char
2660 .RE
2661 
2662 .sp
2663 .ne 2
2664 .na
2665 \fB\fBM-c^?\fR\fR
2666 .ad
2667 .RS 21n
2668 vi-backward-change-char
2669 .RE
2670 
2671 .sp
2672 .ne 2
2673 .na
2674 \fB\fBM-cl\fR\fR
2675 .ad
2676 .RS 21n
2677 vi-forward-change-char
2678 .RE
2679 
2680 .sp
2681 .ne 2
2682 .na
2683 \fB\fBM-c\\fR\fR
2684 .ad
2685 .RS 21n
2686 vi-forward-change-char (META-c-space)
2687 .RE
2688 
2689 .sp
2690 .ne 2
2691 .na
2692 \fB\fBM-c^\fR\fR
2693 .ad
2694 .RS 21n
2695 vi-change-to-bol
2696 .RE
2697 
2698 .sp
2699 .ne 2
2700 .na
2701 \fB\fBM-c0\fR\fR
2702 .ad
2703 .RS 21n
2704 vi-change-to-bol
2705 .RE
2706 
2707 .sp
2708 .ne 2
2709 .na
2710 \fB\fBM-c$\fR\fR
2711 .ad
2712 .RS 21n
2713 vi-change-rest-of-line
2714 .RE
2715 
2716 .sp
2717 .ne 2
2718 .na
2719 \fB\fBM-c|\fR\fR
2720 .ad
2721 .RS 21n
2722 vi-change-to-column
2723 .RE
2724 
2725 .sp
2726 .ne 2
2727 .na
2728 \fB\fBM-c%\fR\fR
2729 .ad
2730 .RS 21n
2731 vi-change-to-parenthesis
2732 .RE
2733 
2734 .sp
2735 .ne 2
2736 .na
2737 \fB\fBM-dh\fR\fR
2738 .ad
2739 .RS 21n
2740 backward-delete-char
2741 .RE
2742 
2743 .sp
2744 .ne 2
2745 .na
2746 \fB\fBM-d^H\fR\fR
2747 .ad
2748 .RS 21n
2749 backward-delete-char
2750 .RE
2751 
2752 .sp
2753 .ne 2
2754 .na
2755 \fB\fBM-d^?\fR\fR
2756 .ad
2757 .RS 21n
2758 backward-delete-char
2759 .RE
2760 
2761 .sp
2762 .ne 2
2763 .na
2764 \fB\fBM-dl\fR\fR
2765 .ad
2766 .RS 21n
2767 forward-delete-char
2768 .RE
2769 
2770 .sp
2771 .ne 2
2772 .na
2773 \fB\fBM-d\fR\fR
2774 .ad
2775 .RS 21n
2776 forward-delete-char (META-d-space)
2777 .RE
2778 
2779 .sp
2780 .ne 2
2781 .na
2782 \fB\fBM-dd\fR\fR
2783 .ad
2784 .RS 21n
2785 delete-line
2786 .RE
2787 
2788 .sp
2789 .ne 2
2790 .na
2791 \fB\fBM-db\fR\fR
2792 .ad
2793 .RS 21n
2794 backward-delete-word
2795 .RE
2796 
2797 .sp
2798 .ne 2
2799 .na
2800 \fB\fBM-dB\fR\fR
2801 .ad
2802 .RS 21n
2803 backward-delete-word
2804 .RE
2805 
2806 .sp
2807 .ne 2
2808 .na
2809 \fB\fBM-de\fR\fR
2810 .ad
2811 .RS 21n
2812 forward-delete-word
2813 .RE
2814 
2815 .sp
2816 .ne 2
2817 .na
2818 \fB\fBM-dE\fR\fR
2819 .ad
2820 .RS 21n
2821 forward-delete-word
2822 .RE
2823 
2824 .sp
2825 .ne 2
2826 .na
2827 \fB\fBM-dw\fR\fR
2828 .ad
2829 .RS 21n
2830 forward-delete-word
2831 .RE
2832 
2833 .sp
2834 .ne 2
2835 .na
2836 \fB\fBM-dW\fR\fR
2837 .ad
2838 .RS 21n
2839 forward-delete-word
2840 .RE
2841 
2842 .sp
2843 .ne 2
2844 .na
2845 \fB\fBM-dF\fR\fR
2846 .ad
2847 .RS 21n
2848 backward-delete-find
2849 .RE
2850 
2851 .sp
2852 .ne 2
2853 .na
2854 \fB\fBM-df\fR\fR
2855 .ad
2856 .RS 21n
2857 forward-delete-find
2858 .RE
2859 
2860 .sp
2861 .ne 2
2862 .na
2863 \fB\fBM-dT\fR\fR
2864 .ad
2865 .RS 21n
2866 backward-delete-to
2867 .RE
2868 
2869 .sp
2870 .ne 2
2871 .na
2872 \fB\fBM-dt\fR\fR
2873 .ad
2874 .RS 21n
2875 forward-delete-to
2876 .RE
2877 
2878 .sp
2879 .ne 2
2880 .na
2881 \fB\fBM-d;\fR\fR
2882 .ad
2883 .RS 21n
2884 delete-refind
2885 .RE
2886 
2887 .sp
2888 .ne 2
2889 .na
2890 \fB\fBM-d,\fR\fR
2891 .ad
2892 .RS 21n
2893 delete-invert-refind
2894 .RE
2895 
2896 .sp
2897 .ne 2
2898 .na
2899 \fB\fBM-d^\fR\fR
2900 .ad
2901 .RS 21n
2902 backward-kill-line
2903 .RE
2904 
2905 .sp
2906 .ne 2
2907 .na
2908 \fB\fBM-d0\fR\fR
2909 .ad
2910 .RS 21n
2911 backward-kill-line
2912 .RE
2913 
2914 .sp
2915 .ne 2
2916 .na
2917 \fB\fBM-d$\fR\fR
2918 .ad
2919 .RS 21n
2920 kill-line
2921 .RE
2922 
2923 .sp
2924 .ne 2
2925 .na
2926 \fB\fBM-D\fR\fR
2927 .ad
2928 .RS 21n
2929 kill-line
2930 .RE
2931 
2932 .sp
2933 .ne 2
2934 .na
2935 \fB\fBM-d|\fR\fR
2936 .ad
2937 .RS 21n
2938 delete-to-column
2939 .RE
2940 
2941 .sp
2942 .ne 2
2943 .na
2944 \fB\fBM-d%\fR\fR
2945 .ad
2946 .RS 21n
2947 delete-to-parenthesis
2948 .RE
2949 
2950 .sp
2951 .ne 2
2952 .na
2953 \fB\fBM-e\fR\fR
2954 .ad
2955 .RS 21n
2956 forward-word
2957 .RE
2958 
2959 .sp
2960 .ne 2
2961 .na
2962 \fB\fBM-E\fR\fR
2963 .ad
2964 .RS 21n
2965 forward-word
2966 .RE
2967 
2968 .sp
2969 .ne 2
2970 .na
2971 \fB\fBM-f\fR\fR
2972 .ad
2973 .RS 21n
2974 forward-find-char
2975 .RE
2976 
2977 .sp
2978 .ne 2
2979 .na
2980 \fB\fBM-F\fR\fR
2981 .ad
2982 .RS 21n
2983 backward-find-char
2984 .RE
2985 
2986 .sp
2987 .ne 2
2988 .na
2989 \fB\fBM--\fR\fR
2990 .ad
2991 .RS 21n
2992 up-history
2993 .RE
2994 
2995 .sp
2996 .ne 2
2997 .na
2998 \fB\fBM-h\fR\fR
2999 .ad
3000 .RS 21n
3001 cursor-left
3002 .RE
3003 
3004 .sp
3005 .ne 2
3006 .na
3007 \fB\fBM-H\fR\fR
3008 .ad
3009 .RS 21n
3010 beginning-of-history
3011 .RE
3012 
3013 .sp
3014 .ne 2
3015 .na
3016 \fB\fBM-i\fR\fR
3017 .ad
3018 .RS 21n
3019 vi-insert
3020 .RE
3021 
3022 .sp
3023 .ne 2
3024 .na
3025 \fB\fBM-I\fR\fR
3026 .ad
3027 .RS 21n
3028 vi-insert-at-bol
3029 .RE
3030 
3031 .sp
3032 .ne 2
3033 .na
3034 \fB\fBM-j\fR\fR
3035 .ad
3036 .RS 21n
3037 down-history
3038 .RE
3039 
3040 .sp
3041 .ne 2
3042 .na
3043 \fB\fBM-J\fR\fR
3044 .ad
3045 .RS 21n
3046 history-search-forward
3047 .RE
3048 
3049 .sp
3050 .ne 2
3051 .na
3052 \fB\fBM-k\fR\fR
3053 .ad
3054 .RS 21n
3055 up-history
3056 .RE
3057 
3058 .sp
3059 .ne 2
3060 .na
3061 \fB\fBM-K\fR\fR
3062 .ad
3063 .RS 21n
3064 history-search-backward
3065 .RE
3066 
3067 .sp
3068 .ne 2
3069 .na
3070 \fB\fBM-l\fR\fR
3071 .ad
3072 .RS 21n
3073 cursor-right
3074 .RE
3075 
3076 .sp
3077 .ne 2
3078 .na
3079 \fB\fBM-L\fR\fR
3080 .ad
3081 .RS 21n
3082 end-of-history
3083 .RE
3084 
3085 .sp
3086 .ne 2
3087 .na
3088 \fB\fBM-n\fR\fR
3089 .ad
3090 .RS 21n
3091 history-re-search-forward
3092 .RE
3093 
3094 .sp
3095 .ne 2
3096 .na
3097 \fB\fBM-N\fR\fR
3098 .ad
3099 .RS 21n
3100 history-re-search-backward
3101 .RE
3102 
3103 .sp
3104 .ne 2
3105 .na
3106 \fB\fBM-p\fR\fR
3107 .ad
3108 .RS 21n
3109 append-yank
3110 .RE
3111 
3112 .sp
3113 .ne 2
3114 .na
3115 \fB\fBM-P\fR\fR
3116 .ad
3117 .RS 21n
3118 yank
3119 .RE
3120 
3121 .sp
3122 .ne 2
3123 .na
3124 \fB\fBM-r\fR\fR
3125 .ad
3126 .RS 21n
3127 vi-replace-char
3128 .RE
3129 
3130 .sp
3131 .ne 2
3132 .na
3133 \fB\fBM-R\fR\fR
3134 .ad
3135 .RS 21n
3136 vi-overwrite
3137 .RE
3138 
3139 .sp
3140 .ne 2
3141 .na
3142 \fB\fBM-s\fR\fR
3143 .ad
3144 .RS 21n
3145 vi-forward-change-char
3146 .RE
3147 
3148 .sp
3149 .ne 2
3150 .na
3151 \fB\fBM-S\fR\fR
3152 .ad
3153 .RS 21n
3154 vi-change-line
3155 .RE
3156 
3157 .sp
3158 .ne 2
3159 .na
3160 \fB\fBM-t\fR\fR
3161 .ad
3162 .RS 21n
3163 forward-to-char
3164 .RE
3165 
3166 .sp
3167 .ne 2
3168 .na
3169 \fB\fBM-T\fR\fR
3170 .ad
3171 .RS 21n
3172 backward-to-char
3173 .RE
3174 
3175 .sp
3176 .ne 2
3177 .na
3178 \fB\fBM-u\fR\fR
3179 .ad
3180 .RS 21n
3181 vi-undo
3182 .RE
3183 
3184 .sp
3185 .ne 2
3186 .na
3187 \fB\fBM-w\fR\fR
3188 .ad
3189 .RS 21n
3190 forward-to-word
3191 .RE
3192 
3193 .sp
3194 .ne 2
3195 .na
3196 \fB\fBM-W\fR\fR
3197 .ad
3198 .RS 21n
3199 forward-to-word
3200 .RE
3201 
3202 .sp
3203 .ne 2
3204 .na
3205 \fB\fBM-x\fR\fR
3206 .ad
3207 .RS 21n
3208 forward-delete-char
3209 .RE
3210 
3211 .sp
3212 .ne 2
3213 .na
3214 \fB\fBM-X\fR\fR
3215 .ad
3216 .RS 21n
3217 backward-delete-char
3218 .RE
3219 
3220 .sp
3221 .ne 2
3222 .na
3223 \fB\fBM-yh\fR\fR
3224 .ad
3225 .RS 21n
3226 backward-copy-char
3227 .RE
3228 
3229 .sp
3230 .ne 2
3231 .na
3232 \fB\fBM-y^H\fR\fR
3233 .ad
3234 .RS 21n
3235 backward-copy-char
3236 .RE
3237 
3238 .sp
3239 .ne 2
3240 .na
3241 \fB\fBM-y^?\fR\fR
3242 .ad
3243 .RS 21n
3244 backward-copy-char
3245 .RE
3246 
3247 .sp
3248 .ne 2
3249 .na
3250 \fB\fBM-yl\fR\fR
3251 .ad
3252 .RS 21n
3253 forward-copy-char
3254 .RE
3255 
3256 .sp
3257 .ne 2
3258 .na
3259 \fB\fBM-y\\fR\fR
3260 .ad
3261 .RS 21n
3262 forward-copy-char (META-y-space)
3263 .RE
3264 
3265 .sp
3266 .ne 2
3267 .na
3268 \fB\fBM-ye\fR\fR
3269 .ad
3270 .RS 21n
3271 forward-copy-word
3272 .RE
3273 
3274 .sp
3275 .ne 2
3276 .na
3277 \fB\fBM-yE\fR\fR
3278 .ad
3279 .RS 21n
3280 forward-copy-word
3281 .RE
3282 
3283 .sp
3284 .ne 2
3285 .na
3286 \fB\fBM-yw\fR\fR
3287 .ad
3288 .RS 21n
3289 forward-copy-word
3290 .RE
3291 
3292 .sp
3293 .ne 2
3294 .na
3295 \fB\fBM-yW\fR\fR
3296 .ad
3297 .RS 21n
3298 forward-copy-word
3299 .RE
3300 
3301 .sp
3302 .ne 2
3303 .na
3304 \fB\fBM-yb\fR\fR
3305 .ad
3306 .RS 21n
3307 backward-copy-word
3308 .RE
3309 
3310 .sp
3311 .ne 2
3312 .na
3313 \fB\fBM-yB\fR\fR
3314 .ad
3315 .RS 21n
3316 backward-copy-word
3317 .RE
3318 
3319 .sp
3320 .ne 2
3321 .na
3322 \fB\fBM-yf\fR\fR
3323 .ad
3324 .RS 21n
3325 forward-copy-find
3326 .RE
3327 
3328 .sp
3329 .ne 2
3330 .na
3331 \fB\fBM-yF\fR\fR
3332 .ad
3333 .RS 21n
3334 backward-copy-find
3335 .RE
3336 
3337 .sp
3338 .ne 2
3339 .na
3340 \fB\fBM-yt\fR\fR
3341 .ad
3342 .RS 21n
3343 forward-copy-to
3344 .RE
3345 
3346 .sp
3347 .ne 2
3348 .na
3349 \fB\fBM-yT\fR\fR
3350 .ad
3351 .RS 21n
3352 backward-copy-to
3353 .RE
3354 
3355 .sp
3356 .ne 2
3357 .na
3358 \fB\fBM-y;\fR\fR
3359 .ad
3360 .RS 21n
3361 copy-refind
3362 .RE
3363 
3364 .sp
3365 .ne 2
3366 .na
3367 \fB\fBM-y,\fR\fR
3368 .ad
3369 .RS 21n
3370 copy-invert-refind
3371 .RE
3372 
3373 .sp
3374 .ne 2
3375 .na
3376 \fB\fBM-y^\fR\fR
3377 .ad
3378 .RS 21n
3379 copy-to-bol
3380 .RE
3381 
3382 .sp
3383 .ne 2
3384 .na
3385 \fB\fBM-y0\fR\fR
3386 .ad
3387 .RS 21n
3388 copy-to-bol
3389 .RE
3390 
3391 .sp
3392 .ne 2
3393 .na
3394 \fB\fBM-y$\fR\fR
3395 .ad
3396 .RS 21n
3397 copy-rest-of-line
3398 .RE
3399 
3400 .sp
3401 .ne 2
3402 .na
3403 \fB\fBM-yy\fR\fR
3404 .ad
3405 .RS 21n
3406 copy-line
3407 .RE
3408 
3409 .sp
3410 .ne 2
3411 .na
3412 \fB\fBM-Y\fR\fR
3413 .ad
3414 .RS 21n
3415 copy-line
3416 .RE
3417 
3418 .sp
3419 .ne 2
3420 .na
3421 \fB\fBM-y|\fR\fR
3422 .ad
3423 .RS 21n
3424 copy-to-column
3425 .RE
3426 
3427 .sp
3428 .ne 2
3429 .na
3430 \fB\fBM-y%\fR\fR
3431 .ad
3432 .RS 21n
3433 copy-to-parenthesis
3434 .RE
3435 
3436 .sp
3437 .ne 2
3438 .na
3439 \fB\fBM-^E\fR\fR
3440 .ad
3441 .RS 21n
3442 emacs-mode
3443 .RE
3444 
3445 .sp
3446 .ne 2
3447 .na
3448 \fB\fBM-^H\fR\fR
3449 .ad
3450 .RS 21n
3451 cursor-left
3452 .RE
3453 
3454 .sp
3455 .ne 2
3456 .na
3457 \fB\fBM-^?\fR\fR
3458 .ad
3459 .RS 21n
3460 cursor-left
3461 .RE
3462 
3463 .sp
3464 .ne 2
3465 .na
3466 \fB\fBM-^L\fR\fR
3467 .ad
3468 .RS 21n
3469 clear-screen
3470 .RE
3471 
3472 .sp
3473 .ne 2
3474 .na
3475 \fB\fBM-^N\fR\fR
3476 .ad
3477 .RS 21n
3478 down-history
3479 .RE
3480 
3481 .sp
3482 .ne 2
3483 .na
3484 \fB\fBM-^P\fR\fR
3485 .ad
3486 .RS 21n
3487 up-history
3488 .RE
3489 
3490 .sp
3491 .ne 2
3492 .na
3493 \fB\fBM-^R\fR\fR
3494 .ad
3495 .RS 21n
3496 redisplay
3497 .RE
3498 
3499 .sp
3500 .ne 2
3501 .na
3502 \fB\fBM-^D\fR\fR
3503 .ad
3504 .RS 21n
3505 list-or-eof
3506 .RE
3507 
3508 .sp
3509 .ne 2
3510 .na
3511 \fB\fBM-^I\fR\fR
3512 .ad
3513 .RS 21n
3514 complete-word
3515 .RE
3516 
3517 .sp
3518 .ne 2
3519 .na
3520 \fB\fBM-\r\fR\fR
3521 .ad
3522 .RS 21n
3523 newline
3524 .RE
3525 
3526 .sp
3527 .ne 2
3528 .na
3529 \fB\fBM-\n\fR\fR
3530 .ad
3531 .RS 21n
3532 newline
3533 .RE
3534 
3535 .sp
3536 .ne 2
3537 .na
3538 \fB\fBM-^X^R\fR\fR
3539 .ad
3540 .RS 21n
3541 read-init-files
3542 .RE
3543 
3544 .sp
3545 .ne 2
3546 .na
3547 \fB\fBM-^Xh\fR\fR
3548 .ad
3549 .RS 21n
3550 list-history
3551 .RE
3552 
3553 .sp
3554 .ne 2
3555 .na
3556 \fB\fBM-0, M-1, ... M-9\fR\fR
3557 .ad
3558 .RS 21n
3559 digit-argument (see below)
3560 .RE
3561 
3562 .sp
3563 .LP
3564 Note that \fB^I\fR is what the TAB key generates.
3565 .SS "Entering Repeat Counts"
3566 .sp
3567 .LP
3568 Many of the key binding functions described previously, take an optional count,
3569 typed in before the target key sequence. This is interpreted as a repeat count
3570 by most bindings. A notable exception is the goto-column binding, which
3571 interprets the count as a column number.
3572 .sp
3573 .LP
3574 By default you can specify this count argument by pressing the META key while
3575 typing in the numeric count. This relies on the digit-argument action being
3576 bound to 'META-0', 'META-1' etc. Once any one of these bindings has been
3577 activated, you can optionally take your finger off the META key to type in the
3578 rest of the number, since every numeric digit thereafter is treated as part of
3579 the number, unless it is preceded by the literal-next binding. As soon as a
3580 non-digit, or literal digit key is pressed the repeat count is terminated and
3581 either causes the just typed character to be added to the line that many times,
3582 or causes the next key binding function to be given that argument.
3583 .sp
3584 .LP
3585 For example, in \fBemacs\fR mode, typing:
3586 .sp
3587 .in +2
3588 .nf
3589 M-12a
3590 .fi
3591 .in -2
3592 
3593 .sp
3594 .LP
3595 causes the letter 'a' to be added to the line 12 times, whereas
3596 .sp
3597 .in +2
3598 .nf
3599 M-4M-c
3600 .fi
3601 .in -2
3602 
3603 .sp
3604 .LP
3605 Capitalizes the next 4 words.
3606 .sp
3607 .LP
3608 In \fBvi\fR command mode the meta modifier is automatically added to all
3609 characters typed in, so to enter a count in \fBvi\fR command-mode, just
3610 involves typing in the number, just as it does in the \fBvi\fR editor itself.
3611 So for example, in vi command mode, typing:
3612 .sp
3613 .in +2
3614 .nf
3615 4w2x
3616 .fi
3617 .in -2
3618 
3619 .sp
3620 .LP
3621 moves the cursor four words to the right, then deletes two characters.
3622 .sp
3623 .LP
3624 You can also bind digit-argument to other key sequences. If these end in a
3625 numeric digit, that digit gets appended to the current repeat count. If it
3626 doesn't end in a numeric digit, a new repeat count is started with a value of
3627 zero, and can be completed by typing in the number, after letting go of the key
3628 which triggered the digit-argument action.
3629 .SH FILES
3630 .sp
3631 .ne 2
3632 .na
3633 \fB\fB/usr/lib/libtecla.so\fR\fR
3634 .ad
3635 .RS 27n
3636 The tecla library
3637 .RE
3638 
3639 .sp
3640 .ne 2
3641 .na
3642 \fB\fB/usr/include/libtecla.h\fR\fR
3643 .ad
3644 .RS 27n
3645 The tecla header file
3646 .RE
3647 
3648 .sp
3649 .ne 2
3650 .na
3651 \fB\fB~/.teclarc\fR\fR
3652 .ad
3653 .RS 27n
3654 The personal tecla customization file
3655 .RE
3656 
3657 .SH ATTRIBUTES
3658 .sp
3659 .LP
3660 See \fBattributes\fR(5) for descriptions of the following attributes:
3661 .sp
3662 
3663 .sp
3664 .TS
3665 box;
3666 c | c
3667 l | l .
3668 ATTRIBUTE TYPE  ATTRIBUTE VALUE
3669 _
3670 Interface Stability     Evolving
3671 .TE
3672 
3673 .SH SEE ALSO
3674 .sp
3675 .LP
3676 \fBvi\fR(1), \fBcpl_complete_word\fR(3TECLA), \fBef_expand_file\fR(3TECLA),
3677 \fBgl_get_line\fR(3TECLA), \fBgl_io_mode\fR(3TECLA), \fBlibtecla\fR(3LIB),
3678 \fBpca_lookup_file\fR(3TECLA), \fBattributes\fR(5)