Mercurial > emacs
comparison etc/TUTORIAL @ 38689:99630a340b59
Be consistent when naming CONTROL and META keys.
author | Pavel Janík <Pavel@Janik.cz> |
---|---|
date | Sat, 04 Aug 2001 14:32:41 +0000 |
parents | 1a12e25dfd9b |
children | 4545461cb478 |
comparison
equal
deleted
inserted
replaced
38688:0346e04a4659 | 38689:99630a340b59 |
---|---|
14 Important note: to end the Emacs session, type C-x C-c. (Two characters.) | 14 Important note: to end the Emacs session, type C-x C-c. (Two characters.) |
15 The characters ">>" at the left margin indicate directions for you to | 15 The characters ">>" at the left margin indicate directions for you to |
16 try using a command. For instance: | 16 try using a command. For instance: |
17 <<Blank lines inserted here by startup of help-with-tutorial>> | 17 <<Blank lines inserted here by startup of help-with-tutorial>> |
18 >> Now type C-v (View next screen) to move to the next screen. | 18 >> Now type C-v (View next screen) to move to the next screen. |
19 (go ahead, do it by holding down the control key while typing v). | 19 (go ahead, do it by holding down the CONTROL key while typing v). |
20 From now on, you should do this again whenever you finish | 20 From now on, you should do this again whenever you finish |
21 reading the screen. | 21 reading the screen. |
22 | 22 |
23 Note that there is an overlap of two lines when you move from screen | 23 Note that there is an overlap of two lines when you move from screen |
24 to screen; this provides some continuity so you can continue reading | 24 to screen; this provides some continuity so you can continue reading |
40 C-v Move forward one screenful | 40 C-v Move forward one screenful |
41 M-v Move backward one screenful | 41 M-v Move backward one screenful |
42 C-l Clear screen and redisplay all the text, | 42 C-l Clear screen and redisplay all the text, |
43 moving the text around the cursor | 43 moving the text around the cursor |
44 to the center of the screen. | 44 to the center of the screen. |
45 (That's control-L, not control-1.) | 45 (That's CONTROL-L, not CONTROL-1.) |
46 | 46 |
47 >> Find the cursor, and note what text is near it. | 47 >> Find the cursor, and note what text is near it. |
48 Then type C-l. | 48 Then type C-l. |
49 Find the cursor again and notice that the same text | 49 Find the cursor again and notice that the same text |
50 is near the cursor now. | 50 is near the cursor now. |
106 | 106 |
107 >> Try to move the cursor off the bottom of the screen with C-n, and | 107 >> Try to move the cursor off the bottom of the screen with C-n, and |
108 see what happens. | 108 see what happens. |
109 | 109 |
110 If moving by characters is too slow, you can move by words. M-f | 110 If moving by characters is too slow, you can move by words. M-f |
111 (Meta-f) moves forward a word and M-b moves back a word. | 111 (META-f) moves forward a word and M-b moves back a word. |
112 | 112 |
113 >> Type a few M-f's and M-b's. | 113 >> Type a few M-f's and M-b's. |
114 | 114 |
115 When you are in the middle of a word, M-f moves to the end of the word. | 115 When you are in the middle of a word, M-f moves to the end of the word. |
116 When you are in whitespace between words, M-f moves to the end of the | 116 When you are in whitespace between words, M-f moves to the end of the |
160 M-e Move forward to end of sentence | 160 M-e Move forward to end of sentence |
161 | 161 |
162 >> Try all of these commands now a few times for practice. | 162 >> Try all of these commands now a few times for practice. |
163 These are the most often used commands. | 163 These are the most often used commands. |
164 | 164 |
165 Two other important cursor motion commands are M-< (Meta Less-than), | 165 Two other important cursor motion commands are M-< (META Less-than), |
166 which moves to the beginning of the whole text, and M-> (Meta | 166 which moves to the beginning of the whole text, and M-> (META |
167 Greater-than), which moves to the end of the whole text. | 167 Greater-than), which moves to the end of the whole text. |
168 | 168 |
169 On most terminals, the "<" is above the comma, so you must use the | 169 On most terminals, the "<" is above the comma, so you must use the |
170 shift key to type it. On these terminals you must use the shift key | 170 shift key to type it. On these terminals you must use the shift key |
171 to type M-< also; without the shift key, you would be typing M-comma. | 171 to type M-< also; without the shift key, you would be typing M-comma. |
272 explain how to get rid of extra windows and go back to basic | 272 explain how to get rid of extra windows and go back to basic |
273 one-window editing. It is simple: | 273 one-window editing. It is simple: |
274 | 274 |
275 C-x 1 One window (i.e., kill all other windows). | 275 C-x 1 One window (i.e., kill all other windows). |
276 | 276 |
277 That is Control-x followed by the digit 1. C-x 1 expands the window | 277 That is CONTROL-x followed by the digit 1. C-x 1 expands the window |
278 which contains the cursor, to occupy the full screen. It deletes all | 278 which contains the cursor, to occupy the full screen. It deletes all |
279 other windows. | 279 other windows. |
280 | 280 |
281 >> Move the cursor to this line and type C-u 0 C-l. | 281 >> Move the cursor to this line and type C-u 0 C-l. |
282 >> Type Control-h k Control-f. | 282 >> Type CONTROL-h k CONTROL-f. |
283 See how this window shrinks, while a new one appears | 283 See how this window shrinks, while a new one appears |
284 to display documentation on the Control-f command. | 284 to display documentation on the CONTROL-f command. |
285 | 285 |
286 >> Type C-x 1 and see the documentation listing window disappear. | 286 >> Type C-x 1 and see the documentation listing window disappear. |
287 | 287 |
288 This command is unlike the other commands you have learned in that it | 288 This command is unlike the other commands you have learned in that it |
289 consists of two characters. It starts with the character Control-x. | 289 consists of two characters. It starts with the character CONTROL-x. |
290 There is a whole series of commands that start with Control-x; many of | 290 There is a whole series of commands that start with CONTROL-x; many of |
291 them have to do with windows, files, buffers, and related things. | 291 them have to do with windows, files, buffers, and related things. |
292 These commands are two, three or four characters long. | 292 These commands are two, three or four characters long. |
293 | 293 |
294 | 294 |
295 * INSERTING AND DELETING | 295 * INSERTING AND DELETING |
781 characters with it. Then set the margin back to 70 using | 781 characters with it. Then set the margin back to 70 using |
782 C-x f again. | 782 C-x f again. |
783 | 783 |
784 If you make changes in the middle of a paragraph, Auto Fill mode | 784 If you make changes in the middle of a paragraph, Auto Fill mode |
785 does not re-fill it for you. | 785 does not re-fill it for you. |
786 To re-fill the paragraph, type M-q (Meta-q) with the cursor inside | 786 To re-fill the paragraph, type M-q (META-q) with the cursor inside |
787 that paragraph. | 787 that paragraph. |
788 | 788 |
789 >> Move the cursor into the previous paragraph and type M-q. | 789 >> Move the cursor into the previous paragraph and type M-q. |
790 | 790 |
791 | 791 |
854 ------------------ | 854 ------------------ |
855 | 855 |
856 One of the nice features of Emacs is that you can display more than one | 856 One of the nice features of Emacs is that you can display more than one |
857 window on the screen at the same time. | 857 window on the screen at the same time. |
858 | 858 |
859 >> Move the cursor to this line and type C-u 0 C-l (that's control-L, not | 859 >> Move the cursor to this line and type C-u 0 C-l (that's CONTROL-L, not |
860 control-1). | 860 CONTROL-1). |
861 | 861 |
862 >> Now type C-x 2 which splits the screen into two windows. | 862 >> Now type C-x 2 which splits the screen into two windows. |
863 Both windows display this tutorial. The cursor stays in the top window. | 863 Both windows display this tutorial. The cursor stays in the top window. |
864 | 864 |
865 >> Type C-M-v to scroll the bottom window. | 865 >> Type C-M-v to scroll the bottom window. |
866 (If you do not have a real Meta key, type ESC C-v.) | 866 (If you do not have a real META key, type ESC C-v.) |
867 | 867 |
868 >> Type C-x o ("o" for "other") to move the cursor to the bottom window. | 868 >> Type C-x o ("o" for "other") to move the cursor to the bottom window. |
869 >> Use C-v and M-v in the bottom window to scroll it. | 869 >> Use C-v and M-v in the bottom window to scroll it. |
870 Keep reading these directions in the top window. | 870 Keep reading these directions in the top window. |
871 | 871 |
886 META key, you can type C-M-v by holding down both CONTROL and META while | 886 META key, you can type C-M-v by holding down both CONTROL and META while |
887 typing v. It does not matter whether CONTROL or META "comes first," | 887 typing v. It does not matter whether CONTROL or META "comes first," |
888 because both of these keys act by modifying the characters you type. | 888 because both of these keys act by modifying the characters you type. |
889 | 889 |
890 If you do not have a real META key, and you use ESC instead, the order | 890 If you do not have a real META key, and you use ESC instead, the order |
891 does matter: you must type ESC followed by Control-v, because | 891 does matter: you must type ESC followed by CONTROL-v, because |
892 Control-ESC v will not work. This is because ESC is a character in | 892 CONTROL-ESC v will not work. This is because ESC is a character in |
893 its own right, not a modifier key. | 893 its own right, not a modifier key. |
894 | 894 |
895 >> Type C-x 1 (in the top window) to get rid of the bottom window. | 895 >> Type C-x 1 (in the top window) to get rid of the bottom window. |
896 | 896 |
897 (If you had typed C-x 1 in the bottom window, that would get rid | 897 (If you had typed C-x 1 in the bottom window, that would get rid |
939 get you started using Emacs. There is so much available in Emacs that | 939 get you started using Emacs. There is so much available in Emacs that |
940 it would be impossible to explain it all here. However, you may want | 940 it would be impossible to explain it all here. However, you may want |
941 to learn more about Emacs since it has many other useful features. | 941 to learn more about Emacs since it has many other useful features. |
942 Emacs provides commands for reading documentation about Emacs | 942 Emacs provides commands for reading documentation about Emacs |
943 commands. These "help" commands all start with the character | 943 commands. These "help" commands all start with the character |
944 Control-h, which is called "the Help character". | 944 CONTROL-h, which is called "the Help character". |
945 | 945 |
946 To use the Help features, type the C-h character, and then a | 946 To use the Help features, type the C-h character, and then a |
947 character saying what kind of help you want. If you are REALLY lost, | 947 character saying what kind of help you want. If you are REALLY lost, |
948 type C-h ? and Emacs will tell you what kinds of help it can give. | 948 type C-h ? and Emacs will tell you what kinds of help it can give. |
949 If you have typed C-h and decide you do not want any help, just | 949 If you have typed C-h and decide you do not want any help, just |
996 values you can set to customize Emacs behavior. You need to type in | 996 values you can set to customize Emacs behavior. You need to type in |
997 the name of the variable when Emacs prompts for it. | 997 the name of the variable when Emacs prompts for it. |
998 | 998 |
999 C-h a Command Apropos. Type in a keyword and Emacs will list | 999 C-h a Command Apropos. Type in a keyword and Emacs will list |
1000 all the commands whose names contain that keyword. | 1000 all the commands whose names contain that keyword. |
1001 These commands can all be invoked with Meta-x. | 1001 These commands can all be invoked with META-x. |
1002 For some commands, Command Apropos will also list a one | 1002 For some commands, Command Apropos will also list a one |
1003 or two character sequence which runs the same command. | 1003 or two character sequence which runs the same command. |
1004 | 1004 |
1005 >> Type C-h a file<Return>. | 1005 >> Type C-h a file<Return>. |
1006 | 1006 |