Print this page
9842 man page typos and spelling
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man5/tecla.5.man.txt
+++ new/usr/src/man/man5/tecla.5.man.txt
1 1 TECLA(5) Standards, Environments, and Macros TECLA(5)
2 2
3 3
4 4
5 5 NAME
6 6 tecla, teclarc - User interface provided by the tecla library.
7 7
8 8 DESCRIPTION
9 9 This man page describes the command-line editing features that are
10 10 available to users of programs that read keyboard input via the tecla
11 11 library. Users of the tcsh shell will find the default key bindings
12 12 very familiar. Users of the bash shell will also find it quite
13 13 familiar, but with a few minor differences, most notably in how forward
14 14 and backward searches through the list of historical commands are
15 15 performed. There are two major editing modes, one with emacs-like key
16 16 bindings and another with vi-like key bindings. By default emacs mode
17 17 is enabled, but vi(1) mode can alternatively be selected via the user's
18 18 configuration file. This file can also be used to change the bindings
19 19 of individual keys to suit the user's preferences. By default, tab
20 20 completion is provided. If the application hasn't reconfigured this to
21 21 complete other types of symbols, then tab completion completes file
22 22 names.
23 23
24 24 Key Sequence Notation
25 25 In the rest of this man page, and also in all tecla configuration
26 26 files, key sequences are expressed as follows.
27 27
28 28 ^A or C-a
29 29 This is a 'CONTROL-A', entered by pressing the CONTROL key
30 30 at the same time as the 'A' key.
31 31
32 32
33 33 \E or M-
34 34 In key sequences, both of these notations can be entered
35 35 either by pressing the ESCAPE key, then the following key,
36 36 or by pressing the META key at the same time as the
37 37 following key. Thus the key sequence M-p can be typed in
38 38 two ways, by pressing the ESCAPE key, followed by pressing
39 39 'P', or by pressing the META key at the same time as 'P'.
40 40
41 41
42 42 up
43 43 This refers to the up-arrow key.
44 44
45 45
46 46 down
47 47 This refers to the down-arrow key.
48 48
49 49
50 50 left
51 51 This refers to the left-arrow key.
52 52
53 53
54 54 right
55 55 This refers to the right-arrow key.
56 56
57 57
58 58 a
59 59 This is just a normal 'A' key.
60 60
61 61
62 62 The Tecla Configuration File
63 63 By default, tecla looks for a file called .teclarc in your home
64 64 directory (ie. ~/.teclarc). If it finds this file, it reads it,
65 65 interpreting each line as defining a new key binding or an editing
66 66 configuration option. Since the emacs key-bindings are installed by
67 67 default, if you want to use the non-default vi editing mode, the most
68 68 important item to go in this file is the following line:
69 69
70 70 edit-mode vi
71 71
72 72
73 73
74 74 This will re-configure the default bindings for vi-mode. The complete
75 75 set of arguments that this command accepts are:
76 76
77 77 vi
78 78 Install key bindings like those of the vi editor.
79 79
80 80
81 81 emacs
82 82 Install key bindings like those of the emacs editor. This is
83 83 the default.
84 84
85 85
86 86 none
87 87 Use just the native line editing facilities provided by the
88 88 terminal driver.
89 89
90 90
91 91
92 92 To prevent the terminal bell from being rung, such as when an
93 93 unrecognized control-sequence is typed, place the following line in the
94 94 configuration file:
95 95
96 96 nobeep
97 97
98 98
99 99
100 100 An example of a key binding line in the configuration file is the
101 101 following.
102 102
103 103 bind M-[2~ insert-mode
104 104
105 105
106 106
107 107 On many keyboards, the above key sequence is generated when one presses
108 108 the insert key, so with this key binding, one can toggle between the
109 109 emacs-mode insert and overwrite modes by hitting one key. One could
110 110 also do it by typing out the above sequence of characters one by one.
111 111 As explained above, the M- part of this sequence can be typed either by
112 112 pressing the ESCAPE key before the following key, or by pressing the
113 113 META key at the same time as the following key. Thus if you had set the
114 114 above key binding, and the insert key on your keyboard didn't generate
115 115 the above key sequence, you could still type it in either of the
116 116 following 2 ways.
117 117
118 118 1. Hit the ESCAPE key momentarily, then press '[', then '2',
119 119 then finally '~'.
120 120
121 121 2. Press the META key at the same time as pressing the '[' key,
122 122 then press '2', then '~'.
123 123
124 124
125 125 If you set a key binding for a key sequence that is already bound to a
126 126 function, the new binding overrides the old one. If in the new binding
127 127 you omit the name of the new function to bind to the key sequence, the
128 128 original binding becomes undefined.
129 129
130 130
131 131 Starting with versions of libtecla later than 1.3.3 it is now possible
132 132 to bind key sequences that begin with a printable character. Previously
133 133 key sequences were required to start with a CONTROL or META character.
134 134
135 135
136 136 Note that the special keywords "up", "down", "left", and "right" refer
137 137 to the arrow keys, and are thus not treated as key sequences. So, for
138 138 example, to rebind the up and down arrow keys to use the history search
139 139 mechanism instead of the simple history recall method, you could place
140 140 the following in your configuration file:
141 141
142 142 bind up history-search-backwards
143 143 bind down history-search-backwards
144 144
145 145
146 146
147 147 To unbind an existing binding, you can do this with the bind command by
148 148 omitting to name any action to rebind the key sequence to. For example,
149 149 by not specifying an action function, the following command unbinds the
150 150 default beginning-of-line action from the ^A key sequence:
151 151
152 152 bind ^A
153 153
154 154
155 155
156 156 If you create a ~/.teclarc configuration file, but it appears to have
157 157 no effect on the program, check the documentation of the program to see
158 158 if the author chose a different name for this file.
159 159
160 160 Filename and Tilde Completion
161 161 With the default key bindings, pressing the TAB key (aka. ^I) results
162 162 in tecla attempting to complete the incomplete file name that precedes
163 163 the cursor. Tecla searches backwards from the cursor, looking for the
164 164 start of the file name, stopping when it hits either a space or the
165 165 start of the line. If more than one file has the specified prefix, then
166 166 tecla completes the file name up to the point at which the ambiguous
167 167 matches start to differ, then lists the possible matches.
168 168
169 169
170 170 In addition to literally written file names, tecla can complete files
171 171 that start with ~/ and ~user/ expressions and that contain $envvar
172 172 expressions. In particular, if you hit TAB within an incomplete ~user,
173 173 expression, tecla will attempt to complete the username, listing any
174 174 ambiguous matches.
175 175
176 176
177 177 The completion binding is implemented using the cpl_complete_word()
178 178 function, which is also available separately to users of this library.
179 179 See the cpl_complete_word(3TECLA) man page for more details.
180 180
181 181 Filename Expansion
182 182 With the default key bindings, pressing ^X* causes tecla to expand the
183 183 file name that precedes the cursor, replacing ~/ and ~user/ expressions
184 184 with the corresponding home directories, and replacing $envvar
185 185 expressions with the value of the specified environment variable, then
186 186 if there are any wildcards, replacing the so far expanded file name
187 187 with a space-separated list of the files which match the wild cards.
188 188
189 189
190 190 The expansion binding is implemented using the ef_expand_file()
191 191 function. See the ef_expand_file(3TECLA) man page for more details.
192 192
193 193 Recalling Previously Typed Lines
194 194 Every time that a new line is entered by the user, it is appended to a
195 195 list of historical input lines maintained within the GetLine resource
196 196 object. You can traverse up and down this list using the up and down
197 197 arrow keys. Alternatively, you can do the same with the ^P, and ^N
198 198 keys, and in vi command mode you can alternatively use the k and j
199 199 characters. Thus pressing up-arrow once, replaces the current input
200 200 line with the previously entered line. Pressing up-arrow again,
201 201 replaces this with the line that was entered before it, etc.. Having
202 202 gone back one or more lines into the history list, one can return to
203 203 newer lines by pressing down-arrow one or more times. If you do this
204 204 sufficient times, you will return to the original line that you were
205 205 entering when you first hit up-arrow.
206 206
207 207
208 208 Note that in vi mode, all of the history recall functions switch the
209 209 library into command mode.
210 210
211 211
212 212 In emacs mode the M-p and M-n keys work just like the ^P and ^N keys,
213 213 except that they skip all but those historical lines which share the
214 214 prefix that precedes the cursor. In vi command mode the upper case 'K'
215 215 and 'J' characters do the same thing, except that the string that they
216 216 search for includes the character under the cursor as well as what
217 217 precedes it.
218 218
219 219
220 220 Thus for example, suppose that you were in emacs mode, and you had just
221 221 entered the following list of commands in the order shown:
222 222
223 223 ls ~/tecla/
224 224 cd ~/tecla
225 225 ls -l getline.c
226 226 emacs ~/tecla/getline.c
227 227
228 228
229 229
230 230 If you next typed:
231 231
232 232 ls
↓ open down ↓ |
232 lines elided |
↑ open up ↑ |
233 233
234 234
235 235
236 236 and then hit M-p, then rather than returning the previously typed emacs
237 237 line, which doesn't start with "ls", tecla would recall the "ls -l
238 238 getline.c" line. Pressing M-p again would recall the "ls ~/tecla/"
239 239 line.
240 240
241 241
242 242 Note that if the string that you are searching for, contains any of the
243 - special characters, *, ?, or '[', then it is interpretted as a pattern
244 - to be matched. Thus, cotinuing with the above example, after typing in
245 - the list of commands shown, if you then typed:
243 + special characters, *, ?, or '[', then it is interpreted as a pattern
244 + to be matched. Thus, continuing with the above example, after typing
245 + in the list of commands shown, if you then typed:
246 246
247 247 *tecla*
248 248
249 249
250 250
251 251 and hit M-p, then the "emacs ~/tecla/getline.c" line would be recalled
252 252 first, since it contains the word tecla somewhere in the line,
253 253 Similarly, hitting M-p again, would recall the "ls ~/tecla/" line, and
254 254 hitting it once more would recall the "ls ~/tecla/" line. The pattern
255 255 syntax is the same as that described for file name expansion, in the
256 256 ef_expand_file(3TECLA).
257 257
258 258 History Files
259 259 Authors of programs that use the tecla library have the option of
260 260 saving historical command-lines in a file before exiting, and
261 261 subsequently reading them back in from this file when the program is
262 262 next started. There is no standard name for this file, since it makes
263 263 sense for each application to use its own history file, so that
264 264 commands from different applications don't get mixed up.
265 265
266 266 International Character Sets
267 267 Since libtecla version 1.4.0, tecla has been 8-bit clean. This means
268 268 that all 8-bit characters that are printable in the user's current
269 269 locale are now displayed verbatim and included in the returned input
270 270 line. Assuming that the calling program correctly contains a call like
271 271 the following,
272 272
273 273 setlocale(LC_CTYPE, "");
274 274
275 275
276 276
277 277 then the current locale is determined by the first of the environment
278 278 variables LC_CTYPE, LC_ALL, and LANG, that is found to contain a valid
279 279 locale name. If none of these variables are defined, or the program
280 280 neglects to call setlocale, then the default C locale is used, which is
281 281 US 7-bit ASCII. On most unix-like platforms, you can get a list of
282 282 valid locales by typing the command:
283 283
284 284 locale -a
285 285
286 286
287 287
288 288 at the shell prompt.
289 289
290 290 Meta Keys and Locales
291 291 Beware that in most locales other than the default C locale, META
292 292 characters become printable, and they are then no longer considered to
293 293 match M-c style key bindings. This allows international characters to
294 294 be entered with the compose key without unexpectedly triggering META
295 295 key bindings. You can still invoke META bindings, since there are
296 296 actually two ways to do this. For example the binding M-c can also be
297 297 invoked by pressing the ESCAPE key momentarily, then pressing the c
298 298 key, and this will work regardless of locale. Moreover, many modern
299 299 terminal emulators, such as gnome's gnome-terminal's and KDE's konsole
300 300 terminals, already generate escape pairs like this when you use the
301 301 META key, rather than a real meta character, and other emulators
302 302 usually have a way to request this behavior, so you can continue to use
303 303 the META key on most systems.
304 304
305 305
306 306 For example, although xterm terminal emulators generate real 8-bit meta
307 307 characters by default when you use the META key, they can be configured
308 308 to output the equivalent escape pair by setting their EightBitInput X
309 309 resource to False. You can either do this by placing a line like the
310 310 following in your ~/.Xdefaults file,
311 311
312 312 XTerm*EightBitInput: False
313 313
314 314
315 315
316 316 or by starting an xterm with an -xrm '*EightBitInput: False' command-
317 317 line argument. In recent versions of xterm you can toggle this feature
318 318 on and off with the 'Meta Sends Escape' option in the menu that is
319 319 displayed when you press the left mouse button and the CONTROL key
320 320 within an xterm window. In CDE, dtterms can be similarly coerced to
321 321 generate escape pairs in place of meta characters, by setting the
322 322 Dtterm*KshMode resource to True.
323 323
324 324 Entering International Characters
325 325 If you don't have a keyboard that generates all of the international
326 326 characters that you need, there is usually a compose key that will
327 327 allow you to enter special characters, or a way to create one. For
328 328 example, under X windows on unix-like systems, if your keyboard doesn't
329 329 have a compose key, you can designate a redundant key to serve this
330 330 purpose with the xmodmap command. For example, on many PC keyboards
331 331 there is a microsoft-windows key, which is otherwise useless under
332 332 Linux. On a laptop, for example, the xev program might report that
333 333 pressing this key generates keycode 115. To turn this key into a
334 334 COMPOSE key, do the following:
335 335
336 336 xmodmap -e 'keycode 115 = Multi_key'
337 337
338 338
339 339
340 340 Type this key followed by a " character to enter an 'I' with a umlaut
341 341 over it.
342 342
343 343 The Available Key Binding Functions
344 344 The following is a list of the editing functions provided by the tecla
345 345 library. The names in the leftmost column of the list can be used in
346 346 configuration files to specify which function a given key or
347 347 combination of keys should invoke. They are also used in the next two
348 348 sections to list the default key bindings in emacs and vi modes.
349 349
350 350 user-interrupt
351 351 Send a SIGINT signal to the parent
352 352 process.
353 353
354 354
355 355 suspend
356 356 Suspend the parent process.
357 357
358 358
359 359 stop-output
360 360 Pause terminal output.
361 361
362 362
363 363 start-output
364 364 Resume paused terminal output.
365 365
366 366
367 367 literal-next
368 368 Arrange for the next character to be
369 369 treated as a normal character. This
370 370 allows control characters to be entered.
371 371
372 372
373 373 cursor-right
374 374 Move the cursor one character right.
375 375
376 376
377 377 cursor-left
378 378 Move the cursor one character left.
379 379
380 380
381 381 insert-mode
382 382 Toggle between insert mode and overwrite
383 383 mode.
384 384
385 385
386 386 beginning-of-line
387 387 Move the cursor to the beginning of the
388 388 line.
389 389
390 390
391 391 end-of-line
392 392 Move the cursor to the end of the line.
393 393
394 394
395 395 delete-line
396 396 Delete the contents of the current line.
397 397
398 398
399 399 kill-line
400 400 Delete everything that follows the
401 401 cursor.
402 402
403 403
404 404 backward-kill-line
405 405 Delete all characters between the cursor
406 406 and the start of the line.
407 407
408 408
409 409 forward-word
410 410 Move to the end of the word which follows
411 411 the cursor.
412 412
413 413
414 414 forward-to-word
415 415 Move the cursor to the start of the word
416 416 that follows the cursor.
417 417
418 418
419 419 backward-word
420 420 Move to the start of the word which
421 421 precedes the cursor.
422 422
423 423
424 424 goto-column
425 425 Move the cursor to the 1-relative column
426 426 in the line specified by any preceding
427 427 digit-argument sequences (see Entering
428 428 Repeat Counts below).
429 429
430 430
431 431 find-parenthesis
432 432 If the cursor is currently over a
433 433 parenthesis character, move it to the
434 434 matching parenthesis character. If not
435 435 over a parenthesis character move right
436 436 to the next close parenthesis.
437 437
438 438
439 439 forward-delete-char
440 440 Delete the character under the cursor.
441 441
442 442
443 443 backward-delete-char
444 444 Delete the character which precedes the
445 445 cursor.
446 446
447 447
448 448 list-or-eof
449 449 This is intended for binding to ^D. When
450 450 invoked when the cursor is within the
451 451 line it displays all possible completions
452 452 then redisplays the line unchanged. When
453 453 invoked on an empty line, it signals end-
454 454 of-input (EOF) to the caller of
455 455 gl_get_line().
456 456
457 457
458 458 del-char-or-list-or-eof
459 459 This is intended for binding to ^D. When
460 460 invoked when the cursor is within the
461 461 line it invokes forward-delete-char. When
462 462 invoked at the end of the line it
463 463 displays all possible completions then
464 464 redisplays the line unchanged. When
465 465 invoked on an empty line, it signals end-
466 466 of-input (EOF) to the caller of
467 467 gl_get_line().
468 468
469 469
470 470 forward-delete-word
471 471 Delete the word which follows the cursor.
472 472
473 473
474 474 backward-delete-word
475 475 Delete the word which precedes the
476 476 cursor.
477 477
478 478
479 479 upcase-word
480 480 Convert all of the characters of the word
481 481 which follows the cursor, to upper case.
482 482
483 483
484 484 downcase-word
485 485 Convert all of the characters of the word
486 486 which follows the cursor, to lower case.
487 487
488 488
489 489 capitalize-word
490 490 Capitalize the word which follows the
491 491 cursor.
492 492
493 493
494 494 change-case
495 495 If the next character is upper case,
496 496 toggle it to lower case and vice versa.
497 497
498 498
499 499 redisplay
500 500 Redisplay the line.
501 501
502 502
503 503 clear-screen
504 504 Clear the terminal, then redisplay the
505 505 current line.
506 506
507 507
508 508 transpose-chars
509 509 Swap the character under the cursor with
510 510 the character just before the cursor.
511 511
512 512
513 513 set-mark
514 514 Set a mark at the position of the cursor.
515 515
516 516
517 517 exchange-point-and-mark
518 518 Move the cursor to the last mark that was
519 519 set, and move the mark to where the
520 520 cursor used to be.
521 521
522 522
523 523 kill-region
524 524 Delete the characters that lie between
525 525 the last mark that was set, and the
526 526 cursor.
527 527
528 528
529 529 copy-region-as-kill
530 530 Copy the text between the mark and the
531 531 cursor to the cut buffer, without
532 532 deleting the original text.
533 533
534 534
535 535 yank
536 536 Insert the text that was last deleted,
537 537 just before the current position of the
538 538 cursor.
539 539
540 540
541 541 append-yank
542 542 Paste the current contents of the cut
543 543 buffer, after the cursor.
544 544
545 545
546 546 up-history
547 547 Recall the next oldest line that was
548 548 entered. Note that in vi mode you are
549 549 left in command mode.
550 550
551 551
552 552 down-history
553 553 Recall the next most recent line that was
554 554 entered. If no history recall session is
555 555 currently active, the next line from a
556 556 previous recall session is recalled.
557 557 Note that in vi mode you are left in
558 558 command mode.
559 559
560 560
561 561 history-search-backward
562 562 Recall the next oldest line who's prefix
563 563 matches the string which currently
564 564 precedes the cursor (in vi command-mode
565 565 the character under the cursor is also
566 566 included in the search string). Note that
567 567 in vi mode you are left in command mode.
568 568
569 569
570 570 history-search-forward
571 571 Recall the next newest line who's prefix
572 572 matches the string which currently
573 573 precedes the cursor (in vi command-mode
574 574 the character under the cursor is also
575 575 included in the search string). Note that
576 576 in vi mode you are left in command mode.
577 577
578 578
579 579 history-re-search-backward
580 580 Recall the next oldest line who's prefix
581 581 matches that established by the last
582 582 invocation of either history-search-
583 583 forward or history-search-backward.
584 584
585 585
586 586 history-re-search-forward
587 587 Recall the next newest line who's prefix
↓ open down ↓ |
332 lines elided |
↑ open up ↑ |
588 588 matches that established by the last
589 589 invocation of either history-search-
590 590 forward or history-search-backward.
591 591
592 592
593 593 complete-word
594 594 Attempt to complete the incomplete word
595 595 which precedes the cursor. Unless the
596 596 host program has customized word
597 597 completion, file name completion is
598 - attempted. In vi commmand mode the
598 + attempted. In vi command mode the
599 599 character under the cursor is also
600 600 included in the word being completed, and
601 601 you are left in vi insert mode.
602 602
603 603
604 604 expand-filename
605 605 Within the command line, expand wild
606 606 cards, tilde expressions and dollar
607 607 expressions in the file name which
608 608 immediately precedes the cursor. In vi
609 - commmand mode the character under the
609 + command mode the character under the
610 610 cursor is also included in the file name
611 611 being expanded, and you are left in vi
612 612 insert mode.
613 613
614 614
615 615 list-glob
616 616 List any file names which match the wild-
617 617 card, tilde and dollar expressions in the
618 618 file name which immediately precedes the
619 619 cursor, then redraw the input line
620 620 unchanged.
621 621
622 622
623 623 list-history
624 624 Display the contents of the history list
625 625 for the current history group. If a
626 626 repeat count of > 1 is specified, only
627 627 that many of the most recent lines are
628 628 displayed. See the Entering Repeat Counts
629 629 section.
630 630
631 631
632 632 read-from-file
633 633 Temporarily switch to reading input from
634 634 the file who's name precedes the cursor.
635 635
636 636
637 637 read-init-files
638 638 Re-read teclarc configuration files.
639 639
640 640
641 641 beginning-of-history
642 642 Move to the oldest line in the history
643 643 list. Note that in vi mode you are left
644 644 in command mode.
645 645
646 646
647 647 end-of-history
648 648 Move to the newest line in the history
649 649 list (ie. the current line). Note that in
650 650 vi mode this leaves you in command mode.
651 651
652 652
653 653 digit-argument
654 654 Enter a repeat count for the next key
655 655 binding function. For details, see the
656 656 Entering Repeat Counts section.
657 657
658 658
659 659 newline
660 660 Terminate and return the current contents
661 661 of the line, after appending a newline
662 662 character. The newline character is
663 663 normally '\n', but will be the first
664 664 character of the key sequence that
665 665 invoked the newline action, if this
666 666 happens to be a printable character. If
667 667 the action was invoked by the '\n'
668 668 newline character or the '\r' carriage
669 669 return character, the line is appended to
670 670 the history buffer.
671 671
672 672
673 673 repeat-history
674 674 Return the line that is being edited,
675 675 then arrange for the next most recent
676 676 entry in the history buffer to be
677 677 recalled when tecla is next called.
678 678 Repeatedly invoking this action causes
679 679 successive historical input lines to be
680 680 re-executed. Note that this action is
681 681 equivalent to the 'Operate' action in
682 682 ksh.
683 683
684 684
685 685 ring-bell
686 686 Ring the terminal bell, unless the bell
687 687 has been silenced via the nobeep
688 688 configuration option (see The Tecla
689 689 Configuration File section).
690 690
691 691
692 692 forward-copy-char
693 693 Copy the next character into the cut
694 694 buffer (NB. use repeat counts to copy
695 695 more than one).
696 696
697 697
698 698 backward-copy-char
699 699 Copy the previous character into the cut
700 700 buffer.
701 701
702 702
703 703 forward-copy-word
704 704 Copy the next word into the cut buffer.
705 705
706 706
707 707 backward-copy-word
708 708 Copy the previous word into the cut
709 709 buffer.
710 710
711 711
712 712 forward-find-char
713 713 Move the cursor to the next occurrence of
714 714 the next character that you type.
715 715
716 716
717 717 backward-find-char
718 718 Move the cursor to the last occurrence of
719 719 the next character that you type.
720 720
721 721
722 722 forward-to-char
723 723 Move the cursor to the character just
724 724 before the next occurrence of the next
725 725 character that the user types.
726 726
727 727
728 728 backward-to-char
729 729 Move the cursor to the character just
730 730 after the last occurrence before the
731 731 cursor of the next character that the
732 732 user types.
733 733
734 734
735 735 repeat-find-char
736 736 Repeat the last backward-find-char,
737 737 forward-find-char, backward-to-char or
738 738 forward-to-char.
739 739
740 740
741 741 invert-refind-char
742 742 Repeat the last backward-find-char,
743 743 forward-find-char, backward-to-char, or
744 744 forward-to-char in the opposite
745 745 direction.
746 746
747 747
748 748 delete-to-column
749 749 Delete the characters from the cursor up
750 750 to the column that is specified by the
751 751 repeat count.
752 752
753 753
754 754 delete-to-parenthesis
755 755 Delete the characters from the cursor up
756 756 to and including the matching
757 757 parenthesis, or next close parenthesis.
758 758
759 759
760 760 forward-delete-find
761 761 Delete the characters from the cursor up
762 762 to and including the following occurrence
763 763 of the next character typed.
764 764
765 765
766 766 backward-delete-find
767 767 Delete the characters from the cursor up
768 768 to and including the preceding occurrence
769 769 of the next character typed.
770 770
771 771
772 772 forward-delete-to
773 773 Delete the characters from the cursor up
774 774 to, but not including, the following
775 775 occurrence of the next character typed.
776 776
777 777
778 778 backward-delete-to
779 779 Delete the characters from the cursor up
780 780 to, but not including, the preceding
781 781 occurrence of the next character typed.
782 782
783 783
784 784 delete-refind
785 785 Repeat the last *-delete-find or
786 786 *-delete-to action.
787 787
788 788
789 789 delete-invert-refind
790 790 Repeat the last *-delete-find or
791 791 *-delete-to action, in the opposite
792 792 direction.
793 793
794 794
795 795 copy-to-column
796 796 Copy the characters from the cursor up to
797 797 the column that is specified by the
798 798 repeat count, into the cut buffer.
799 799
800 800
801 801 copy-to-parenthesis
802 802 Copy the characters from the cursor up to
803 803 and including the matching parenthesis,
804 804 or next close parenthesis, into the cut
805 805 buffer.
806 806
807 807
808 808 forward-copy-find
809 809 Copy the characters from the cursor up to
810 810 and including the following occurrence of
811 811 the next character typed, into the cut
812 812 buffer.
813 813
814 814
815 815 backward-copy-find
816 816 Copy the characters from the cursor up to
817 817 and including the preceding occurrence of
818 818 the next character typed, into the cut
819 819 buffer.
820 820
821 821
822 822 forward-copy-to
823 823 Copy the characters from the cursor up
824 824 to, but not including, the following
825 825 occurrence of the next character typed,
826 826 into the cut buffer.
827 827
828 828
829 829 backward-copy-to
830 830 Copy the characters from the cursor up
831 831 to, but not including, the preceding
832 832 occurrence of the next character typed,
833 833 into the cut buffer.
834 834
835 835
836 836 copy-refind
837 837 Repeat the last *-copy-find or *-copy-to
838 838 action.
839 839
840 840
841 841 copy-invert-refind
842 842 Repeat the last *-copy-find or *-copy-to
843 843 action, in the opposite direction.
844 844
845 845
846 846 vi-mode
847 847 Switch to vi mode from emacs mode.
848 848
849 849
850 850 emacs-mode
851 851 Switch to emacs mode from vi mode.
852 852
853 853
854 854 vi-insert
855 855 From vi command mode, switch to insert
856 856 mode.
857 857
858 858
859 859 vi-overwrite
860 860 From vi command mode, switch to overwrite
861 861 mode.
862 862
863 863
864 864 vi-insert-at-bol
865 865 From vi command mode, move the cursor to
866 866 the start of the line and switch to
867 867 insert mode.
868 868
869 869
870 870 vi-append-at-eol
871 871 From vi command mode, move the cursor to
872 872 the end of the line and switch to append
873 873 mode.
874 874
875 875
876 876 vi-append
877 877 From vi command mode, move the cursor one
878 878 position right, and switch to insert
879 879 mode.
880 880
881 881
882 882 vi-replace-char
883 883 From vi command mode, replace the
884 884 character under the cursor with the next
885 885 character entered.
886 886
887 887
888 888 vi-forward-change-char
889 889 From vi command mode, delete the next
890 890 character then enter insert mode.
891 891
892 892
893 893 vi-backward-change-char
894 894 From vi command mode, delete the
895 895 preceding character then enter insert
896 896 mode.
897 897
898 898
899 899 vi-forward-change-word
900 900 From vi command mode, delete the next
901 901 word then enter insert mode.
902 902
903 903
904 904 vi-backward-change-word
905 905 From vi command mode, delete the
906 906 preceding word then enter insert mode.
907 907
908 908
909 909 vi-change-rest-of-line
910 910 From vi command mode, delete from the
911 911 cursor to the end of the line, then enter
912 912 insert mode.
913 913
914 914
915 915 vi-change-line
916 916 From vi command mode, delete the current
917 917 line, then enter insert mode.
918 918
919 919
920 920 vi-change-to-bol
921 921 From vi command mode, delete all
922 922 characters between the cursor and the
923 923 beginning of the line, then enter insert
924 924 mode.
925 925
926 926
927 927 vi-change-to-column
928 928 From vi command mode, delete the
929 929 characters from the cursor up to the
930 930 column that is specified by the repeat
931 931 count, then enter insert mode.
932 932
933 933
934 934 vi-change-to-parenthesis
935 935 Delete the characters from the cursor up
936 936 to and including the matching
937 937 parenthesis, or next close parenthesis,
938 938 then enter vi insert mode.
939 939
940 940
941 941 vi-forward-change-find
942 942 From vi command mode, delete the
943 943 characters from the cursor up to and
944 944 including the following occurrence of the
945 945 next character typed, then enter insert
946 946 mode.
947 947
948 948
949 949 vi-backward-change-find
950 950 From vi command mode, delete the
951 951 characters from the cursor up to and
952 952 including the preceding occurrence of the
953 953 next character typed, then enter insert
954 954 mode.
955 955
956 956
957 957 vi-forward-change-to
958 958 From vi command mode, delete the
959 959 characters from the cursor up to, but not
960 960 including, the following occurrence of
961 961 the next character typed, then enter
962 962 insert mode.
963 963
964 964
965 965 vi-backward-change-to
966 966 From vi command mode, delete the
967 967 characters from the cursor up to, but not
968 968 including, the preceding occurrence of
969 969 the next character typed, then enter
970 970 insert mode.
971 971
972 972
973 973 vi-change-refind
974 974 Repeat the last vi-*-change-find or
975 975 vi-*-change-to action.
976 976
977 977
978 978 vi-change-invert-refind
979 979 Repeat the last vi-*-change-find or
980 980 vi-*-change-to action, in the opposite
981 981 direction.
982 982
983 983
984 984 vi-undo
985 985 In vi mode, undo the last editing
986 986 operation.
987 987
988 988
989 989 vi-repeat-change
990 990 In vi command mode, repeat the last
991 991 command that modified the line.
992 992
993 993
994 994 Default Key Bindings In emacs Mode
995 995 The following default key bindings, which can be overriden by the tecla
996 996 configuration file, are designed to mimic most of the bindings of the
997 997 unix tcsh shell shell, when it is in emacs editing mode.
998 998
999 999
1000 1000 This is the default editing mode of the tecla library.
1001 1001
1002 1002
1003 1003 Under UNIX the terminal driver sets a number of special keys for
1004 1004 certain functions. The tecla library attempts to use the same key
1005 1005 bindings to maintain consistency. The key sequences shown for the
1006 1006 following 6 bindings are thus just examples of what they will probably
1007 1007 be set to. If you have used the stty command to change these keys, then
1008 1008 the default bindings should match.
1009 1009
1010 1010 ^C
1011 1011 user-interrupt
1012 1012
1013 1013
1014 1014 ^\
1015 1015 abort
1016 1016
1017 1017
1018 1018 ^Z
1019 1019 suspend
1020 1020
1021 1021
1022 1022 ^Q
1023 1023 start-output
1024 1024
1025 1025
1026 1026 ^S
1027 1027 stop-output
1028 1028
1029 1029
1030 1030 ^V
1031 1031 literal-next
1032 1032
1033 1033
1034 1034
1035 1035 The cursor keys are referred to by name, as follows. This is necessary
1036 1036 because different types of terminals generate different key sequences
1037 1037 when their cursor keys are pressed.
1038 1038
1039 1039 right
1040 1040 cursor-right
1041 1041
1042 1042
1043 1043 left
1044 1044 cursor-left
1045 1045
↓ open down ↓ |
426 lines elided |
↑ open up ↑ |
1046 1046
1047 1047 up
1048 1048 up-history
1049 1049
1050 1050
1051 1051 down
1052 1052 down-history
1053 1053
1054 1054
1055 1055
1056 - The remaining bindings don't depend on the terminal setttings.
1056 + The remaining bindings don't depend on the terminal settings.
1057 1057
1058 1058 ^F
1059 1059 cursor-right
1060 1060
1061 1061
1062 1062 ^B
1063 1063 cursor-left
1064 1064
1065 1065
1066 1066 M-i
1067 1067 insert-mode
1068 1068
1069 1069
1070 1070 ^A
1071 1071 beginning-of-line
1072 1072
1073 1073
1074 1074 ^E
1075 1075 end-of-line
1076 1076
1077 1077
1078 1078 ^U
1079 1079 delete-line
1080 1080
1081 1081
1082 1082 ^K
1083 1083 kill-line
1084 1084
1085 1085
1086 1086 M-f
1087 1087 forward-word
1088 1088
1089 1089
1090 1090 M-b
1091 1091 backward-word
1092 1092
1093 1093
1094 1094 ^D
1095 1095 del-char-or-list-or-eof
1096 1096
1097 1097
1098 1098 ^H
1099 1099 backward-delete-char
1100 1100
1101 1101
1102 1102 ^?
1103 1103 backward-delete-char
1104 1104
1105 1105
1106 1106 M-d
1107 1107 forward-delete-word
1108 1108
1109 1109
1110 1110 M-^H
1111 1111 backward-delete-word
1112 1112
1113 1113
1114 1114 M-^?
1115 1115 backward-delete-word
1116 1116
1117 1117
1118 1118 M-u
1119 1119 upcase-word
1120 1120
1121 1121
1122 1122 M-l
1123 1123 downcase-word
1124 1124
1125 1125
1126 1126 M-c
1127 1127 capitalize-word
1128 1128
1129 1129
1130 1130 ^R
1131 1131 redisplay
1132 1132
1133 1133
1134 1134 ^L
1135 1135 clear-screen
1136 1136
1137 1137
1138 1138 ^T
1139 1139 transpose-chars
1140 1140
1141 1141
1142 1142 ^@
1143 1143 set-mark
1144 1144
1145 1145
1146 1146 ^X^X
1147 1147 exchange-point-and-mark
1148 1148
1149 1149
1150 1150 ^W
1151 1151 kill-region
1152 1152
1153 1153
1154 1154 M-w
1155 1155 copy-region-as-kill
1156 1156
1157 1157
1158 1158 ^Y
1159 1159 yank
1160 1160
1161 1161
1162 1162 ^P
1163 1163 up-history
1164 1164
1165 1165
1166 1166 ^N
1167 1167 down-history
1168 1168
1169 1169
1170 1170 M-p
1171 1171 history-search-backward
1172 1172
1173 1173
1174 1174 M-n
1175 1175 history-search-forward
1176 1176
1177 1177
1178 1178 ^I
1179 1179 complete-word
1180 1180
1181 1181
1182 1182 ^X*
1183 1183 expand-filename
1184 1184
1185 1185
1186 1186 ^X^F
1187 1187 read-from-file
1188 1188
1189 1189
1190 1190 ^X^R
1191 1191 read-init-files
1192 1192
1193 1193
1194 1194 ^Xg
1195 1195 list-glob
1196 1196
1197 1197
1198 1198 ^Xh
1199 1199 list-history
1200 1200
1201 1201
1202 1202 M-<
1203 1203 beginning-of-history
1204 1204
1205 1205
1206 1206 M->
1207 1207 end-of-history
1208 1208
1209 1209
1210 1210 \n
1211 1211 newline
1212 1212
1213 1213
1214 1214 \r
1215 1215 newline
1216 1216
1217 1217
1218 1218 M-o
1219 1219 repeat-history
1220 1220
1221 1221
1222 1222 M-^V
1223 1223 vi-mode
1224 1224
1225 1225
1226 1226 M-0, M-1, ... M-9
1227 1227 digit-argument (see below)
1228 1228
1229 1229
1230 1230
1231 1231 Note that ^I is what the TAB key generates, and that ^@ can be
1232 1232 generated not only by pressing the CONTROL key and the @ key
1233 1233 simultaneously, but also by pressing the CONTROL key and the space bar
1234 1234 at the same time.
1235 1235
1236 1236 Default Key Bindings in vi Mode
1237 1237 The following default key bindings are designed to mimic the vi style
1238 1238 of editing as closely as possible. This means that very few editing
1239 1239 functions are provided in the initial character input mode, editing
1240 1240 functions instead being provided by the vi command mode. The vi command
1241 1241 mode is entered whenever the ESCAPE character is pressed, or whenever a
1242 1242 key sequence that starts with a meta character is entered. In addition
1243 1243 to mimicing vi, libtecla provides bindings for tab completion, wild-
1244 1244 card expansion of file names, and historical line recall.
1245 1245
1246 1246
1247 1247 To learn how to tell the tecla library to use vi mode instead of the
1248 1248 default emacs editing mode, see the earlier section entitled The Tecla
1249 1249 Configuration File.
1250 1250
1251 1251
1252 1252 Under UNIX the terminal driver sets a number of special keys for
1253 1253 certain functions. The tecla library attempts to use the same key
1254 1254 bindings to maintain consistency, binding them both in input mode and
1255 1255 in command mode. The key sequences shown for the following 6 bindings
1256 1256 are thus just examples of what they will probably be set to. If you
1257 1257 have used the stty command to change these keys, then the default
1258 1258 bindings should match.
1259 1259
1260 1260 ^C
1261 1261 user-interrupt
1262 1262
1263 1263
1264 1264 ^\
1265 1265 abort
1266 1266
1267 1267
1268 1268 ^Z
1269 1269 suspend
1270 1270
1271 1271
1272 1272 ^Q
1273 1273 start-output
1274 1274
1275 1275
1276 1276 ^S
1277 1277 stop-output
1278 1278
1279 1279
1280 1280 ^V
1281 1281 literal-next
1282 1282
1283 1283
1284 1284 M-^C
1285 1285 user-interrupt
1286 1286
1287 1287
1288 1288 M-^\
1289 1289 abort
1290 1290
1291 1291
1292 1292 M-^Z
1293 1293 suspend
1294 1294
1295 1295
1296 1296 M-^Q
1297 1297 start-output
1298 1298
1299 1299
1300 1300 M-^S
1301 1301 stop-output
1302 1302
1303 1303
1304 1304
1305 1305 Note that above, most of the bindings are defined twice, once as a raw
1306 1306 control code like ^C and then a second time as a META character like
1307 1307 M-^C. The former is the binding for vi input mode, whereas the latter
1308 1308 is the binding for vi command mode. Once in command mode all key
1309 1309 sequences that the user types that they don't explicitly start with an
1310 1310 ESCAPE or a META key, have their first key secretly converted to a META
1311 1311 character before the key sequence is looked up in the key binding
1312 1312 table. Thus, once in command mode, when you type the letter i, for
1313 1313 example, the tecla library actually looks up the binding for M-i.
1314 1314
1315 1315
1316 1316 The cursor keys are referred to by name, as follows. This is necessary
1317 1317 because different types of terminals generate different key sequences
1318 1318 when their cursor keys are pressed.
1319 1319
1320 1320 right
1321 1321 cursor-right
1322 1322
1323 1323
1324 1324 left
1325 1325 cursor-left
1326 1326
1327 1327
1328 1328 up
1329 1329 up-history
1330 1330
1331 1331
1332 1332 down
1333 1333 down-history
1334 1334
1335 1335
1336 1336
1337 1337 The cursor keys normally generate a key sequence that start with an
1338 1338 ESCAPE character, so beware that using the arrow keys will put you into
1339 1339 command mode (if you aren't already in command mode).
1340 1340
1341 1341
1342 1342 The following are the terminal-independent key bindings for vi input
1343 1343 mode.
1344 1344
1345 1345 ^D
1346 1346 list-or-eof
1347 1347
1348 1348
1349 1349 ^G
1350 1350 list-glob
1351 1351
1352 1352
1353 1353 ^H
1354 1354 backward-delete-char
1355 1355
1356 1356
1357 1357 ^I
1358 1358 complete-word
1359 1359
1360 1360
1361 1361 \r
1362 1362 newline
1363 1363
1364 1364
1365 1365 \n
1366 1366 newline
1367 1367
1368 1368
1369 1369 ^L
1370 1370 clear-screen
1371 1371
1372 1372
1373 1373 ^N
1374 1374 down-history
1375 1375
1376 1376
1377 1377 ^P
1378 1378 up-history
1379 1379
1380 1380
1381 1381 ^R
1382 1382 redisplay
1383 1383
1384 1384
1385 1385 ^U
1386 1386 backward-kill-line
1387 1387
1388 1388
1389 1389 ^W
1390 1390 backward-delete-word
1391 1391
1392 1392
1393 1393 ^X*
1394 1394 expand-filename
1395 1395
1396 1396
1397 1397 ^X^F
1398 1398 read-from-file
1399 1399
1400 1400
1401 1401 ^X^R
1402 1402 read-init-files
1403 1403
1404 1404
1405 1405 ^?
1406 1406 backward-delete-char
1407 1407
1408 1408
1409 1409
1410 1410 The following are the key bindings that are defined in vi command mode,
1411 1411 this being specified by them all starting with a META character. As
1412 1412 mentioned above, once in command mode the initial meta character is
1413 1413 optional. For example, you might enter command mode by typing ESCAPE,
1414 1414 and then press 'H' twice to move the cursor two positions to the left.
1415 1415 Both 'H' characters get quietly converted to M-h before being compared
1416 1416 to the key binding table, the first one because ESCAPE followed by a
1417 1417 character is always converted to the equivalent META character, and the
1418 1418 second because command mode was already active.
1419 1419
1420 1420 M-<space>
1421 1421 cursor-right (META-space)
1422 1422
1423 1423
1424 1424 M-$
1425 1425 end-of-line
1426 1426
1427 1427
1428 1428 M-*
1429 1429 expand-filename
1430 1430
1431 1431
1432 1432 M-+
1433 1433 down-history
1434 1434
1435 1435
1436 1436 M--
1437 1437 up-history
1438 1438
1439 1439
1440 1440 M-<
1441 1441 beginning-of-history
1442 1442
1443 1443
1444 1444 M->
1445 1445 end-of-history
1446 1446
1447 1447
1448 1448 M-^
1449 1449 beginning-of-line
1450 1450
1451 1451
1452 1452 M-
1453 1453 repeat-find-char
1454 1454
1455 1455
1456 1456 M-,
1457 1457 invert-refind-char
1458 1458
1459 1459
1460 1460 M-|
1461 1461 goto-column
1462 1462
1463 1463
1464 1464 M-~
1465 1465 change-case
1466 1466
1467 1467
1468 1468 M-.
1469 1469 vi-repeat-change
1470 1470
1471 1471
1472 1472 M-%
1473 1473 find-parenthesis
1474 1474
1475 1475
1476 1476 M-a
1477 1477 vi-append
1478 1478
1479 1479
1480 1480 M-A
1481 1481 vi-append-at-eol
1482 1482
1483 1483
1484 1484 M-b
1485 1485 backward-word
1486 1486
1487 1487
1488 1488 M-B
1489 1489 backward-word
1490 1490
1491 1491
1492 1492 M-C
1493 1493 vi-change-rest-of-line
1494 1494
1495 1495
1496 1496 M-cb
1497 1497 vi-backward-change-word
1498 1498
1499 1499
1500 1500 M-cB
1501 1501 vi-backward-change-word
1502 1502
1503 1503
1504 1504 M-cc
1505 1505 vi-change-line
1506 1506
1507 1507
1508 1508 M-ce
1509 1509 vi-forward-change-word
1510 1510
1511 1511
1512 1512 M-cE
1513 1513 vi-forward-change-word
1514 1514
1515 1515
1516 1516 M-cw
1517 1517 vi-forward-change-word
1518 1518
1519 1519
1520 1520 M-cW
1521 1521 vi-forward-change-word
1522 1522
1523 1523
1524 1524 M-cF
1525 1525 vi-backward-change-find
1526 1526
1527 1527
1528 1528 M-cf
1529 1529 vi-forward-change-find
1530 1530
1531 1531
1532 1532 M-cT
1533 1533 vi-backward-change-to
1534 1534
1535 1535
1536 1536 M-ct
1537 1537 vi-forward-change-to
1538 1538
1539 1539
1540 1540 M-c;
1541 1541 vi-change-refind
1542 1542
1543 1543
1544 1544 M-c,
1545 1545 vi-change-invert-refind
1546 1546
1547 1547
1548 1548 M-ch
1549 1549 vi-backward-change-char
1550 1550
1551 1551
1552 1552 M-c^H
1553 1553 vi-backward-change-char
1554 1554
1555 1555
1556 1556 M-c^?
1557 1557 vi-backward-change-char
1558 1558
1559 1559
1560 1560 M-cl
1561 1561 vi-forward-change-char
1562 1562
1563 1563
1564 1564 M-c<space>
1565 1565 vi-forward-change-char (META-c-space)
1566 1566
1567 1567
1568 1568 M-c^
1569 1569 vi-change-to-bol
1570 1570
1571 1571
1572 1572 M-c0
1573 1573 vi-change-to-bol
1574 1574
1575 1575
1576 1576 M-c$
1577 1577 vi-change-rest-of-line
1578 1578
1579 1579
1580 1580 M-c|
1581 1581 vi-change-to-column
1582 1582
1583 1583
1584 1584 M-c%
1585 1585 vi-change-to-parenthesis
1586 1586
1587 1587
1588 1588 M-dh
1589 1589 backward-delete-char
1590 1590
1591 1591
1592 1592 M-d^H
1593 1593 backward-delete-char
1594 1594
1595 1595
1596 1596 M-d^?
1597 1597 backward-delete-char
1598 1598
1599 1599
1600 1600 M-dl
1601 1601 forward-delete-char
1602 1602
1603 1603
1604 1604 M-d<space>
1605 1605 forward-delete-char (META-d-space)
1606 1606
1607 1607
1608 1608 M-dd
1609 1609 delete-line
1610 1610
1611 1611
1612 1612 M-db
1613 1613 backward-delete-word
1614 1614
1615 1615
1616 1616 M-dB
1617 1617 backward-delete-word
1618 1618
1619 1619
1620 1620 M-de
1621 1621 forward-delete-word
1622 1622
1623 1623
1624 1624 M-dE
1625 1625 forward-delete-word
1626 1626
1627 1627
1628 1628 M-dw
1629 1629 forward-delete-word
1630 1630
1631 1631
1632 1632 M-dW
1633 1633 forward-delete-word
1634 1634
1635 1635
1636 1636 M-dF
1637 1637 backward-delete-find
1638 1638
1639 1639
1640 1640 M-df
1641 1641 forward-delete-find
1642 1642
1643 1643
1644 1644 M-dT
1645 1645 backward-delete-to
1646 1646
1647 1647
1648 1648 M-dt
1649 1649 forward-delete-to
1650 1650
1651 1651
1652 1652 M-d;
1653 1653 delete-refind
1654 1654
1655 1655
1656 1656 M-d,
1657 1657 delete-invert-refind
1658 1658
1659 1659
1660 1660 M-d^
1661 1661 backward-kill-line
1662 1662
1663 1663
1664 1664 M-d0
1665 1665 backward-kill-line
1666 1666
1667 1667
1668 1668 M-d$
1669 1669 kill-line
1670 1670
1671 1671
1672 1672 M-D
1673 1673 kill-line
1674 1674
1675 1675
1676 1676 M-d|
1677 1677 delete-to-column
1678 1678
1679 1679
1680 1680 M-d%
1681 1681 delete-to-parenthesis
1682 1682
1683 1683
1684 1684 M-e
1685 1685 forward-word
1686 1686
1687 1687
1688 1688 M-E
1689 1689 forward-word
1690 1690
1691 1691
1692 1692 M-f
1693 1693 forward-find-char
1694 1694
1695 1695
1696 1696 M-F
1697 1697 backward-find-char
1698 1698
1699 1699
1700 1700 M--
1701 1701 up-history
1702 1702
1703 1703
1704 1704 M-h
1705 1705 cursor-left
1706 1706
1707 1707
1708 1708 M-H
1709 1709 beginning-of-history
1710 1710
1711 1711
1712 1712 M-i
1713 1713 vi-insert
1714 1714
1715 1715
1716 1716 M-I
1717 1717 vi-insert-at-bol
1718 1718
1719 1719
1720 1720 M-j
1721 1721 down-history
1722 1722
1723 1723
1724 1724 M-J
1725 1725 history-search-forward
1726 1726
1727 1727
1728 1728 M-k
1729 1729 up-history
1730 1730
1731 1731
1732 1732 M-K
1733 1733 history-search-backward
1734 1734
1735 1735
1736 1736 M-l
1737 1737 cursor-right
1738 1738
1739 1739
1740 1740 M-L
1741 1741 end-of-history
1742 1742
1743 1743
1744 1744 M-n
1745 1745 history-re-search-forward
1746 1746
1747 1747
1748 1748 M-N
1749 1749 history-re-search-backward
1750 1750
1751 1751
1752 1752 M-p
1753 1753 append-yank
1754 1754
1755 1755
1756 1756 M-P
1757 1757 yank
1758 1758
1759 1759
1760 1760 M-r
1761 1761 vi-replace-char
1762 1762
1763 1763
1764 1764 M-R
1765 1765 vi-overwrite
1766 1766
1767 1767
1768 1768 M-s
1769 1769 vi-forward-change-char
1770 1770
1771 1771
1772 1772 M-S
1773 1773 vi-change-line
1774 1774
1775 1775
1776 1776 M-t
1777 1777 forward-to-char
1778 1778
1779 1779
1780 1780 M-T
1781 1781 backward-to-char
1782 1782
1783 1783
1784 1784 M-u
1785 1785 vi-undo
1786 1786
1787 1787
1788 1788 M-w
1789 1789 forward-to-word
1790 1790
1791 1791
1792 1792 M-W
1793 1793 forward-to-word
1794 1794
1795 1795
1796 1796 M-x
1797 1797 forward-delete-char
1798 1798
1799 1799
1800 1800 M-X
1801 1801 backward-delete-char
1802 1802
1803 1803
1804 1804 M-yh
1805 1805 backward-copy-char
1806 1806
1807 1807
1808 1808 M-y^H
1809 1809 backward-copy-char
1810 1810
1811 1811
1812 1812 M-y^?
1813 1813 backward-copy-char
1814 1814
1815 1815
1816 1816 M-yl
1817 1817 forward-copy-char
1818 1818
1819 1819
1820 1820 M-y<space>
1821 1821 forward-copy-char (META-y-space)
1822 1822
1823 1823
1824 1824 M-ye
1825 1825 forward-copy-word
1826 1826
1827 1827
1828 1828 M-yE
1829 1829 forward-copy-word
1830 1830
1831 1831
1832 1832 M-yw
1833 1833 forward-copy-word
1834 1834
1835 1835
1836 1836 M-yW
1837 1837 forward-copy-word
1838 1838
1839 1839
1840 1840 M-yb
1841 1841 backward-copy-word
1842 1842
1843 1843
1844 1844 M-yB
1845 1845 backward-copy-word
1846 1846
1847 1847
1848 1848 M-yf
1849 1849 forward-copy-find
1850 1850
1851 1851
1852 1852 M-yF
1853 1853 backward-copy-find
1854 1854
1855 1855
1856 1856 M-yt
1857 1857 forward-copy-to
1858 1858
1859 1859
1860 1860 M-yT
1861 1861 backward-copy-to
1862 1862
1863 1863
1864 1864 M-y;
1865 1865 copy-refind
1866 1866
1867 1867
1868 1868 M-y,
1869 1869 copy-invert-refind
1870 1870
1871 1871
1872 1872 M-y^
1873 1873 copy-to-bol
1874 1874
1875 1875
1876 1876 M-y0
1877 1877 copy-to-bol
1878 1878
1879 1879
1880 1880 M-y$
1881 1881 copy-rest-of-line
1882 1882
1883 1883
1884 1884 M-yy
1885 1885 copy-line
1886 1886
1887 1887
1888 1888 M-Y
1889 1889 copy-line
1890 1890
1891 1891
1892 1892 M-y|
1893 1893 copy-to-column
1894 1894
1895 1895
1896 1896 M-y%
1897 1897 copy-to-parenthesis
1898 1898
1899 1899
1900 1900 M-^E
1901 1901 emacs-mode
1902 1902
1903 1903
1904 1904 M-^H
1905 1905 cursor-left
1906 1906
1907 1907
1908 1908 M-^?
1909 1909 cursor-left
1910 1910
1911 1911
1912 1912 M-^L
1913 1913 clear-screen
1914 1914
1915 1915
1916 1916 M-^N
1917 1917 down-history
1918 1918
1919 1919
1920 1920 M-^P
1921 1921 up-history
1922 1922
1923 1923
1924 1924 M-^R
1925 1925 redisplay
1926 1926
1927 1927
1928 1928 M-^D
1929 1929 list-or-eof
1930 1930
1931 1931
1932 1932 M-^I
1933 1933 complete-word
1934 1934
1935 1935
1936 1936 M-\r
1937 1937 newline
1938 1938
1939 1939
1940 1940 M-\n
1941 1941 newline
1942 1942
1943 1943
1944 1944 M-^X^R
1945 1945 read-init-files
1946 1946
1947 1947
1948 1948 M-^Xh
1949 1949 list-history
1950 1950
1951 1951
1952 1952 M-0, M-1, ... M-9
1953 1953 digit-argument (see below)
1954 1954
1955 1955
1956 1956
1957 1957 Note that ^I is what the TAB key generates.
1958 1958
1959 1959 Entering Repeat Counts
1960 1960 Many of the key binding functions described previously, take an
1961 1961 optional count, typed in before the target key sequence. This is
1962 1962 interpreted as a repeat count by most bindings. A notable exception is
1963 1963 the goto-column binding, which interprets the count as a column number.
1964 1964
1965 1965
1966 1966 By default you can specify this count argument by pressing the META key
1967 1967 while typing in the numeric count. This relies on the digit-argument
1968 1968 action being bound to 'META-0', 'META-1' etc. Once any one of these
1969 1969 bindings has been activated, you can optionally take your finger off
1970 1970 the META key to type in the rest of the number, since every numeric
1971 1971 digit thereafter is treated as part of the number, unless it is
1972 1972 preceded by the literal-next binding. As soon as a non-digit, or
1973 1973 literal digit key is pressed the repeat count is terminated and either
1974 1974 causes the just typed character to be added to the line that many
1975 1975 times, or causes the next key binding function to be given that
1976 1976 argument.
1977 1977
1978 1978
1979 1979 For example, in emacs mode, typing:
1980 1980
1981 1981 M-12a
1982 1982
1983 1983
1984 1984
1985 1985 causes the letter 'a' to be added to the line 12 times, whereas
1986 1986
1987 1987 M-4M-c
1988 1988
1989 1989
1990 1990
1991 1991 Capitalizes the next 4 words.
1992 1992
1993 1993
1994 1994 In vi command mode the meta modifier is automatically added to all
1995 1995 characters typed in, so to enter a count in vi command-mode, just
1996 1996 involves typing in the number, just as it does in the vi editor itself.
1997 1997 So for example, in vi command mode, typing:
1998 1998
1999 1999 4w2x
2000 2000
2001 2001
2002 2002
2003 2003 moves the cursor four words to the right, then deletes two characters.
2004 2004
2005 2005
2006 2006 You can also bind digit-argument to other key sequences. If these end
2007 2007 in a numeric digit, that digit gets appended to the current repeat
2008 2008 count. If it doesn't end in a numeric digit, a new repeat count is
2009 2009 started with a value of zero, and can be completed by typing in the
2010 2010 number, after letting go of the key which triggered the digit-argument
2011 2011 action.
2012 2012
2013 2013 FILES
2014 2014 /usr/lib/libtecla.so
2015 2015 The tecla library
2016 2016
2017 2017
2018 2018 /usr/include/libtecla.h
2019 2019 The tecla header file
2020 2020
2021 2021
2022 2022 ~/.teclarc
2023 2023 The personal tecla customization file
2024 2024
2025 2025
2026 2026 ATTRIBUTES
2027 2027 See attributes(5) for descriptions of the following attributes:
2028 2028
2029 2029
2030 2030
2031 2031
2032 2032 +--------------------+-----------------+
2033 2033 | ATTRIBUTE TYPE | ATTRIBUTE VALUE |
2034 2034 +--------------------+-----------------+
2035 2035 |Interface Stability | Evolving |
2036 2036 +--------------------+-----------------+
2037 2037
2038 2038 SEE ALSO
2039 2039 vi(1), cpl_complete_word(3TECLA), ef_expand_file(3TECLA),
2040 2040 gl_get_line(3TECLA), gl_io_mode(3TECLA), libtecla(3LIB),
2041 2041 pca_lookup_file(3TECLA), attributes(5)
2042 2042
2043 2043
2044 2044
2045 2045 April 9, 2016 TECLA(5)
↓ open down ↓ |
979 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX