Mercurial > emacs
comparison etc/TUTORIAL @ 1375:577493baf266
*** empty log message ***
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Sat, 10 Oct 1992 01:37:56 +0000 |
parents | ab9a55b26bd4 |
children | 019278028c54 |
comparison
equal
deleted
inserted
replaced
1374:3d87587ddc4e | 1375:577493baf266 |
---|---|
33 key). | 33 key). |
34 | 34 |
35 >> Try typing M-v and then C-v to move back and forth a few times. | 35 >> Try typing M-v and then C-v to move back and forth a few times. |
36 | 36 |
37 | 37 |
38 SUMMARY | 38 * SUMMARY |
39 ------- | 39 --------- |
40 | 40 |
41 The following commands are useful for viewing screenfuls: | 41 The following commands are useful for viewing screenfuls: |
42 | 42 |
43 C-v Move forward one screenful | 43 C-v Move forward one screenful |
44 M-v Move backward one screenful | 44 M-v Move backward one screenful |
50 >> Find the cursor and remember what text is near it. | 50 >> Find the cursor and remember what text is near it. |
51 Then type a C-l. | 51 Then type a C-l. |
52 Find the cursor again and see what text is near it now. | 52 Find the cursor again and see what text is near it now. |
53 | 53 |
54 | 54 |
55 BASIC CURSOR CONTROL | 55 * BASIC CURSOR CONTROL |
56 -------------------- | 56 ---------------------- |
57 | 57 |
58 Getting from screenful to screenful is useful, but how do you | 58 Getting from screenful to screenful is useful, but how do you |
59 reposition yourself within a given screen to a specific place? | 59 reposition yourself within a given screen to a specific place? |
60 There are several ways you can do this. One way (not the best, but | 60 There are several ways you can do this. One way (not the best, but |
61 the most basic) is to use the commands previous, backward, forward | 61 the most basic) is to use the commands previous, backward, forward |
179 | 179 |
180 Did it scroll the screen up by 8 lines? If you would like to | 180 Did it scroll the screen up by 8 lines? If you would like to |
181 scroll it down you can give an argument to M-v. | 181 scroll it down you can give an argument to M-v. |
182 | 182 |
183 | 183 |
184 WHEN EMACS IS HUNG | 184 * WHEN EMACS IS HUNG |
185 ----------------- | 185 -------------------- |
186 | 186 |
187 If Emacs gets into an infinite (or simply very long) computation which | 187 If Emacs gets into an infinite (or simply very long) computation which |
188 you don't want to finish, you can stop it safely by typing C-g. | 188 you don't want to finish, you can stop it safely by typing C-g. |
189 You can also use C-g to discard a numeric argument or the beginning of | 189 You can also use C-g to discard a numeric argument or the beginning of |
190 a command that you don't want to finish. | 190 a command that you don't want to finish. |
205 not want to execute M-ESC, you would type "n" to answer the question. | 205 not want to execute M-ESC, you would type "n" to answer the question. |
206 | 206 |
207 >> Type <ESC> <ESC>, then type n. | 207 >> Type <ESC> <ESC>, then type n. |
208 | 208 |
209 | 209 |
210 WINDOWS | 210 * WINDOWS |
211 ------- | 211 --------- |
212 | 212 |
213 Emacs can have several windows, each displaying its own text. | 213 Emacs can have several windows, each displaying its own text. |
214 At this stage it is better not to go into the techniques of | 214 At this stage it is better not to go into the techniques of |
215 using multiple windows. But you do need to know how to get | 215 using multiple windows. But you do need to know how to get |
216 rid of extra windows that may appear to display help or | 216 rid of extra windows that may appear to display help or |
228 to display documentation on the Control-f command. | 228 to display documentation on the Control-f command. |
229 | 229 |
230 >> Type C-x 1 and see the documentation listing window disappear. | 230 >> Type C-x 1 and see the documentation listing window disappear. |
231 | 231 |
232 | 232 |
233 INSERTING AND DELETING | 233 * INSERTING AND DELETING |
234 ---------------------- | 234 ------------------------ |
235 | 235 |
236 If you want to insert text, just type it. Characters which you can | 236 If you want to insert text, just type it. Characters which you can |
237 see, such as A, 7, *, etc. are taken by Emacs as text and inserted | 237 see, such as A, 7, *, etc. are taken by Emacs as text and inserted |
238 immediately. Type <Return> (the carriage-return key) to insert a | 238 immediately. Type <Return> (the carriage-return key) to insert a |
239 Newline character. | 239 Newline character. |
341 the second kill line comes back, and then a few more. | 341 the second kill line comes back, and then a few more. |
342 If you like, you can try giving M-y positive and negative | 342 If you like, you can try giving M-y positive and negative |
343 arguments. | 343 arguments. |
344 | 344 |
345 | 345 |
346 UNDO | 346 * UNDO |
347 ---- | 347 ------ |
348 | 348 |
349 Any time you make a change to the text and wish you had not done so, | 349 Any time you make a change to the text and wish you had not done so, |
350 you can undo the change (return the text to its previous state) | 350 you can undo the change (return the text to its previous state) |
351 with the undo command, C-x u. Normally, C-x u undoes one command's | 351 with the undo command, C-x u. Normally, C-x u undoes one command's |
352 worth of changes; if you repeat the C-x u several times in a row, | 352 worth of changes; if you repeat the C-x u several times in a row, |
366 | 366 |
367 Giving a numeric argument to C-_ or C-x u is equivalent to repeating | 367 Giving a numeric argument to C-_ or C-x u is equivalent to repeating |
368 it as many times as the argument says. | 368 it as many times as the argument says. |
369 | 369 |
370 | 370 |
371 FILES | 371 * FILES |
372 ----- | 372 ------- |
373 | 373 |
374 In order to make the text you edit permanent, you must put it in a | 374 In order to make the text you edit permanent, you must put it in a |
375 file. Otherwise, it will go away when your invocation of Emacs goes | 375 file. Otherwise, it will go away when your invocation of Emacs goes |
376 away. You put your editing in a file by "finding" the file. What | 376 away. You put your editing in a file by "finding" the file. What |
377 finding means is that you see the contents of the file in your Emacs; | 377 finding means is that you see the contents of the file in your Emacs; |
435 will really create the file with the text that you have inserted. | 435 will really create the file with the text that you have inserted. |
436 From then on, you can consider yourself to be editing an already | 436 From then on, you can consider yourself to be editing an already |
437 existing file. | 437 existing file. |
438 | 438 |
439 | 439 |
440 BUFFERS | 440 * BUFFERS |
441 ------- | 441 --------- |
442 | 442 |
443 If you find a second file with C-x C-f, the first file remains | 443 If you find a second file with C-x C-f, the first file remains |
444 inside Emacs. You can switch back to it by finding it again with | 444 inside Emacs. You can switch back to it by finding it again with |
445 C-x C-f. This way you can get quite a number of files inside Emacs. | 445 C-x C-f. This way you can get quite a number of files inside Emacs. |
446 | 446 |
474 C-x s goes through the list of all the buffers you have | 474 C-x s goes through the list of all the buffers you have |
475 and finds the ones that contain files you have changed. | 475 and finds the ones that contain files you have changed. |
476 For each such buffer, C-x s asks you whether to save it. | 476 For each such buffer, C-x s asks you whether to save it. |
477 | 477 |
478 | 478 |
479 EXTENDING THE COMMAND SET | 479 * EXTENDING THE COMMAND SET |
480 ------------------------- | 480 --------------------------- |
481 | 481 |
482 There are many, many more Emacs commands than could possibly be put | 482 There are many, many more Emacs commands than could possibly be put |
483 on all the control and meta characters. Emacs gets around this with | 483 on all the control and meta characters. Emacs gets around this with |
484 the X (eXtend) command. This comes in two flavors: | 484 the X (eXtend) command. This comes in two flavors: |
485 | 485 |
535 Notice how this line has changed: you've replaced | 535 Notice how this line has changed: you've replaced |
536 the word c-h-a-n-g-e-d with "altered" wherever it occurred | 536 the word c-h-a-n-g-e-d with "altered" wherever it occurred |
537 after the cursor. | 537 after the cursor. |
538 | 538 |
539 | 539 |
540 MODE LINE | 540 * MODE LINE |
541 --------- | 541 ----------- |
542 | 542 |
543 If Emacs sees that you are typing commands slowly it shows them to you | 543 If Emacs sees that you are typing commands slowly it shows them to you |
544 at the bottom of the screen in an area called the "echo area." The echo | 544 at the bottom of the screen in an area called the "echo area." The echo |
545 area contains the bottom line of the screen. The line immediately above | 545 area contains the bottom line of the screen. The line immediately above |
546 it is called the MODE LINE. The mode line says something like | 546 it is called the MODE LINE. The mode line says something like |
547 | 547 |
548 --**--Emacs: TUTORIAL (Fundamental)----58%------------- | 548 ----**--Emacs: TUTORIAL (Fundamental)----58%------------- |
549 | 549 |
550 This is a very useful "information" line. | 550 This is a very useful "information" line. |
551 | 551 |
552 You already know what the filename means--it is the file you have | 552 You already know what the filename means--it is the file you have |
553 found. What the --NN%-- means is that NN percent of the file is | 553 found. What the --NN%-- means is that NN percent of the file is |
622 To re-fill the paragraph, type M-q (Meta-q) with the cursor inside | 622 To re-fill the paragraph, type M-q (Meta-q) with the cursor inside |
623 that paragraph. | 623 that paragraph. |
624 | 624 |
625 >> Move the cursor into the previous paragraph and type M-q. | 625 >> Move the cursor into the previous paragraph and type M-q. |
626 | 626 |
627 SEARCHING | 627 * SEARCHING |
628 --------- | 628 ----------- |
629 | 629 |
630 Emacs can do searches for strings (these are groups of contiguous | 630 Emacs can do searches for strings (these are groups of contiguous |
631 characters or words) either forward through the file or backward | 631 characters or words) either forward through the file or backward |
632 through it. To search for the string means that you are trying to | 632 through it. To search for the string means that you are trying to |
633 locate it somewhere in the file and have Emacs show you where the | 633 locate it somewhere in the file and have Emacs show you where the |
673 search for something earlier in the text? To do this, type C-r for | 673 search for something earlier in the text? To do this, type C-r for |
674 Reverse search. Everything that applies to C-s applies to C-r except | 674 Reverse search. Everything that applies to C-s applies to C-r except |
675 that the direction of the search is reversed. | 675 that the direction of the search is reversed. |
676 | 676 |
677 | 677 |
678 MULTIPLE WINDOWS | 678 * MULTIPLE WINDOWS |
679 ---------------- | 679 ------------------ |
680 | 680 |
681 One of the nice features of Emacs is that you can display more than one | 681 One of the nice features of Emacs is that you can display more than one |
682 window on the screen at the same time. | 682 window on the screen at the same time. |
683 | 683 |
684 >> Move the cursor to this line and type C-u 0 C-l. | 684 >> Move the cursor to this line and type C-u 0 C-l. |
725 | 725 |
726 >> Type C-x o to go back to the top window, and C-x 1 to delete | 726 >> Type C-x o to go back to the top window, and C-x 1 to delete |
727 the bottom window. | 727 the bottom window. |
728 | 728 |
729 | 729 |
730 RECURSIVE EDITING LEVELS | 730 * RECURSIVE EDITING LEVELS |
731 ------------------------ | 731 -------------------------- |
732 | 732 |
733 Sometimes you will get into what is called a "recursive editing | 733 Sometimes you will get into what is called a "recursive editing |
734 level". This is indicated by square brackets in the mode line, | 734 level". This is indicated by square brackets in the mode line, |
735 surrounding the parentheses around the major mode name. For | 735 surrounding the parentheses around the major mode name. For |
736 example, you might see [(Fundamental)] instead of (Fundamental). | 736 example, you might see [(Fundamental)] instead of (Fundamental). |
749 You can't use C-g to get out of a recursive editing level because C-g | 749 You can't use C-g to get out of a recursive editing level because C-g |
750 is used for discarding numeric arguments and partially typed commands | 750 is used for discarding numeric arguments and partially typed commands |
751 WITHIN the recursive editing level. | 751 WITHIN the recursive editing level. |
752 | 752 |
753 | 753 |
754 GETTING MORE HELP | 754 * GETTING MORE HELP |
755 ----------------- | 755 ------------------- |
756 | 756 |
757 In this tutorial we have tried to supply just enough information to | 757 In this tutorial we have tried to supply just enough information to |
758 get you started using Emacs. There is so much available in Emacs that | 758 get you started using Emacs. There is so much available in Emacs that |
759 it would be impossible to explain it all here. However, you may want | 759 it would be impossible to explain it all here. However, you may want |
760 to learn more about Emacs since it has numerous desirable features | 760 to learn more about Emacs since it has numerous desirable features |
821 >> Type C-M-v to scroll the help window. Do this a few times. | 821 >> Type C-M-v to scroll the help window. Do this a few times. |
822 | 822 |
823 >> Type C-x 1 to delete the help window. | 823 >> Type C-x 1 to delete the help window. |
824 | 824 |
825 | 825 |
826 CONCLUSION | 826 * CONCLUSION |
827 ---------- | 827 ------------ |
828 | 828 |
829 Remember, to exit Emacs permanently use C-x C-c. To exit to a shell | 829 Remember, to exit Emacs permanently use C-x C-c. To exit to a shell |
830 temporarily, so that you can come back in, use C-z. | 830 temporarily, so that you can come back in, use C-z. |
831 | 831 |
832 This tutorial is meant to be understandable to all new users, so if | 832 This tutorial is meant to be understandable to all new users, so if |