Mercurial > emacs
comparison etc/TUTORIAL @ 17128:6de8cf26e115
Fix punctuation; add some missing words.
Mention ALT along with the EDIT key.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Fri, 28 Feb 1997 22:40:56 +0000 |
parents | 6cb6d2fe6999 |
children | 6a0e208faefd |
comparison
equal
deleted
inserted
replaced
17127:ab43d13fdfd5 | 17128:6de8cf26e115 |
---|---|
25 the text. | 25 the text. |
26 | 26 |
27 The first thing that you need to know is how to move around from place | 27 The first thing that you need to know is how to move around from place |
28 to place in the text. You already know how to move forward one screen, | 28 to place in the text. You already know how to move forward one screen, |
29 with C-v. To move backwards one screen, type M-v (hold down the META key | 29 with C-v. To move backwards one screen, type M-v (hold down the META key |
30 and type v, or type <ESC>v if you do not have a META or EDIT key). | 30 and type v, or type <ESC>v if you do not have a META, EDIT, or ALT key). |
31 | 31 |
32 >> Try typing M-v and then C-v, a few times. | 32 >> Try typing M-v and then C-v, a few times. |
33 | 33 |
34 | 34 |
35 * SUMMARY | 35 * SUMMARY |
84 >> Move into the line with C-f's and then up with C-p's. | 84 >> Move into the line with C-f's and then up with C-p's. |
85 See what C-p does when the cursor is in the middle of the line. | 85 See what C-p does when the cursor is in the middle of the line. |
86 | 86 |
87 Each of text line ends with a Newline character, which serves to | 87 Each of text line ends with a Newline character, which serves to |
88 separate it from the following line. The last line in your file ought | 88 separate it from the following line. The last line in your file ought |
89 to have a Newline at the end (but Emacs does not require have one). | 89 to have a Newline at the end (but Emacs does not require it to have |
90 one). | |
90 | 91 |
91 >> Try to C-b at the beginning of a line. It should move to | 92 >> Try to C-b at the beginning of a line. It should move to |
92 the end of the previous line. This is because it moves back | 93 the end of the previous line. This is because it moves back |
93 across the Newline character. | 94 across the Newline character. |
94 | 95 |
185 easily learn to use other advanced cursor motion commands as well. | 186 easily learn to use other advanced cursor motion commands as well. |
186 | 187 |
187 Most Emacs commands accept a numeric argument; for most commands, this | 188 Most Emacs commands accept a numeric argument; for most commands, this |
188 serves as a repeat-count. The way you give a command a repeat count | 189 serves as a repeat-count. The way you give a command a repeat count |
189 is by typing C-u and then the digits before you type the command. If | 190 is by typing C-u and then the digits before you type the command. If |
190 you have a META or EDIT key, there is another alternative way to enter | 191 you have a META (or EDIT or ALT) key, there is another alternative way |
191 a numeric argument: type the digits while holding down the META or | 192 to enter a numeric argument: type the digits while holding down the |
192 EDIT key. We recommend learning the C-u method because it works on | 193 META key. We recommend learning the C-u method because it works on |
193 any terminal. | 194 any terminal. |
194 | 195 |
195 For instance, C-u 8 C-f moves forward eight characters. | 196 For instance, C-u 8 C-f moves forward eight characters. |
196 | 197 |
197 >> Try using C-n or C-p with a numeric argument, to move the cursor | 198 >> Try using C-n or C-p with a numeric argument, to move the cursor |
386 | 387 |
387 What do you do if you have some text you want to yank back, and then | 388 What do you do if you have some text you want to yank back, and then |
388 you kill something else? C-y would yank the more recent kill. But | 389 you kill something else? C-y would yank the more recent kill. But |
389 the previous text is not lost. You can get back to it using the M-y | 390 the previous text is not lost. You can get back to it using the M-y |
390 command. After you have done C-y to get the most recent kill, typing | 391 command. After you have done C-y to get the most recent kill, typing |
391 M-Y replaces that yanked text with the previous kill. Typing M-y | 392 M-y replaces that yanked text with the previous kill. Typing M-y |
392 again and again brings in earlier and earlier kills. When you have | 393 again and again brings in earlier and earlier kills. When you have |
393 reached the text you are looking for, you do not have to do anything to | 394 reached the text you are looking for, you do not have to do anything to |
394 keep it. Just go on with your editing, leaving the yanked text where | 395 keep it. Just go on with your editing, leaving the yanked text where |
395 it is. | 396 it is. |
396 | 397 |
686 The part of the mode line inside the parentheses is to tell you what | 687 The part of the mode line inside the parentheses is to tell you what |
687 editing modes you are in. The default mode is Fundamental which is | 688 editing modes you are in. The default mode is Fundamental which is |
688 what you are using now. It is an example of a "major mode". | 689 what you are using now. It is an example of a "major mode". |
689 | 690 |
690 Emacs has many different major modes. Some of them are meant for | 691 Emacs has many different major modes. Some of them are meant for |
691 editing different languages and or kinds of text, such as Lisp mode, | 692 editing different languages and/or kinds of text, such as Lisp mode, |
692 Text mode, etc. At any time one and only one major mode is active, | 693 Text mode, etc. At any time one and only one major mode is active, |
693 and its name can always be found in the mode line just where | 694 and its name can always be found in the mode line just where |
694 "Fundamental" is now. | 695 "Fundamental" is now. |
695 | 696 |
696 Each major mode makes a few commands behave differently. For example, | 697 Each major mode makes a few commands behave differently. For example, |
697 there are commands for creating comments in a program, and since each | 698 there are commands for creating comments in a program, and since each |
698 programming language has a different idea of what a comment should | 699 programming language has a different idea of what a comment should |
699 look like, each major mode has to insert comments differently. Each | 700 look like, each major mode has to insert comments differently. Each |
700 major mode is the name of an extended command, which is how you can | 701 major mode is the name of an extended command, which is how you can |
701 switchto that mode. For example, M-x fundamental-mode is a command to | 702 switch to that mode. For example, M-x fundamental-mode is a command to |
702 switch to Fundamental mode. | 703 switch to Fundamental mode. |
703 | 704 |
704 If you are going to be editing English text, such as this file, you | 705 If you are going to be editing English text, such as this file, you |
705 should probably use Text Mode. | 706 should probably use Text Mode. |
706 >> Type M-x text-mode<Return>. | 707 >> Type M-x text-mode<Return>. |
719 >> Use C-u C-v once or more to bring this line near the top of screen. | 720 >> Use C-u C-v once or more to bring this line near the top of screen. |
720 >> Type C-h m, to see how Text mode differs from Fundamental mode. | 721 >> Type C-h m, to see how Text mode differs from Fundamental mode. |
721 >> Type C-x 1 to remove the documentation from the screen. | 722 >> Type C-x 1 to remove the documentation from the screen. |
722 | 723 |
723 Major modes are called major because there are also minor modes. | 724 Major modes are called major because there are also minor modes. |
724 Minor modes are not to the major modes, just minor modifications of | 725 Minor modes are alternatives not to the major modes, just minor |
725 them. Each minor mode can be turned on or off by itself, independent | 726 modifications of them. Each minor mode can be turned on or off by |
726 of all other minor modes, and independent of your major mode. So you | 727 itself, independent of all other minor modes, and independent of your |
727 can use no minor modes, or one minor mode, or any combination of | 728 major mode. So you can use no minor modes, or one minor mode, or any |
728 several minor modes. | 729 combination of several minor modes. |
729 | 730 |
730 One minor mode which is very useful, especially for editing English | 731 One minor mode which is very useful, especially for editing English |
731 text, is Auto Fill mode. When this mode is on, Emacs breaks the line | 732 text, is Auto Fill mode. When this mode is on, Emacs breaks the line |
732 in between words automatically whenever you insert text and make a | 733 in between words automatically whenever you insert text and make a |
733 line that is too wide. | 734 line that is too wide. |
936 are chosen to indicate what the command does, they can serve also as | 937 are chosen to indicate what the command does, they can serve also as |
937 very brief documentation--sufficient to remind you of commands you | 938 very brief documentation--sufficient to remind you of commands you |
938 have already learned. | 939 have already learned. |
939 | 940 |
940 Multi-character commands such as C-x C-s and (if you have no META or | 941 Multi-character commands such as C-x C-s and (if you have no META or |
941 EDIT key) <ESC>v are also allowed after C-h c. | 942 EDIT or ALT key) <ESC>v are also allowed after C-h c. |
942 | 943 |
943 To get more information about a command, use C-h k instead of C-h c. | 944 To get more information about a command, use C-h k instead of C-h c. |
944 | 945 |
945 >> Type C-h k Control-p. | 946 >> Type C-h k Control-p. |
946 | 947 |
961 | 962 |
962 C-h a Command Apropos. Type in a keyword and Emacs will list | 963 C-h a Command Apropos. Type in a keyword and Emacs will list |
963 all the commands whose names contain that keyword. | 964 all the commands whose names contain that keyword. |
964 These commands can all be invoked with Meta-x. | 965 These commands can all be invoked with Meta-x. |
965 For some commands, Command Apropos will also list a one | 966 For some commands, Command Apropos will also list a one |
966 or two character sequence runs the same command. | 967 or two character sequence which runs the same command. |
967 | 968 |
968 >> Type C-h a file<Return>. | 969 >> Type C-h a file<Return>. |
969 | 970 |
970 This displays in another window a list of all M-x commands with "file" | 971 This displays in another window a list of all M-x commands with "file" |
971 in their names. You will see character-commands like C-x C-f listed | 972 in their names. You will see character-commands like C-x C-f listed |