Mercurial > emacs
comparison etc/TUTORIAL @ 47104:2111424826e5
Use <Delback> instead of <Delete>, and explain how to find it.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 29 Aug 2002 14:43:49 +0000 |
parents | 0cda1beae474 |
children | 2c1dc857a83b |
comparison
equal
deleted
inserted
replaced
47103:4098bad57f21 | 47104:2111424826e5 |
---|---|
301 If you want to insert text, just type the text. Characters which you | 301 If you want to insert text, just type the text. Characters which you |
302 can see, such as A, 7, *, etc. are taken by Emacs as text and inserted | 302 can see, such as A, 7, *, etc. are taken by Emacs as text and inserted |
303 immediately. Type <Return> (the carriage-return key) to insert a | 303 immediately. Type <Return> (the carriage-return key) to insert a |
304 Newline character. | 304 Newline character. |
305 | 305 |
306 You can delete the last character you typed by typing <Delete>. | 306 You can delete the last character you typed by typing <Delback>. |
307 <Delete> is a key on the keyboard, which may be labeled "Del". In | 307 <Delback> is a key on the keyboard--the same one you normally use, |
308 some cases, the "Backspace" key serves as <Delete>, but not always! | 308 outside Emacs, for deleting the last character you typed. It is |
309 | 309 normally a large key a couple of lines up from the <Return> key, and |
310 More generally, <Delete> deletes the character immediately before the | 310 it is usually labeled "Delete", "Del" or "Backspace". |
311 | |
312 If the large key there is labeled "Backspace", then that's the one you | |
313 use for <Delback>. There may also be another key labeled "Delete" | |
314 somewhere else, but that's not <Delback>. | |
315 | |
316 More generally, <Delback> deletes the character immediately before the | |
311 current cursor position. | 317 current cursor position. |
312 | 318 |
313 >> Do this now--type a few characters, then delete them | 319 >> Do this now--type a few characters, then delete them |
314 by typing <Delete> a few times. Don't worry about this file | 320 by typing <Delback> a few times. Don't worry about this file |
315 being changed; you will not alter the master tutorial. This is | 321 being changed; you will not alter the master tutorial. This is |
316 your personal copy of it. | 322 your personal copy of it. |
317 | 323 |
318 When a line of text gets too big for one line on the screen, the line | 324 When a line of text gets too big for one line on the screen, the line |
319 of text is "continued" onto a second screen line. A backslash ("\") | 325 of text is "continued" onto a second screen line. A backslash ("\") |
321 right margin indicates a line which has been continued. | 327 right margin indicates a line which has been continued. |
322 | 328 |
323 >> Insert text until you reach the right margin, and keep on inserting. | 329 >> Insert text until you reach the right margin, and keep on inserting. |
324 You'll see a continuation line appear. | 330 You'll see a continuation line appear. |
325 | 331 |
326 >> Use <Delete>s to delete the text until the line fits on one screen | 332 >> Use <Delback>s to delete the text until the line fits on one screen |
327 line again. The continuation line goes away. | 333 line again. The continuation line goes away. |
328 | 334 |
329 You can delete a Newline character just like any other character. | 335 You can delete a Newline character just like any other character. |
330 Deleting the Newline character between two lines merges them into | 336 Deleting the Newline character between two lines merges them into |
331 one line. If the resulting combined line is too long to fit in the | 337 one line. If the resulting combined line is too long to fit in the |
332 screen width, it will be displayed with a continuation line. | 338 screen width, it will be displayed with a continuation line. |
333 | 339 |
334 >> Move the cursor to the beginning of a line and type <Delete>. This | 340 >> Move the cursor to the beginning of a line and type <Delback>. This |
335 merges that line with the previous line. | 341 merges that line with the previous line. |
336 | 342 |
337 >> Type <Return> to reinsert the Newline you deleted. | 343 >> Type <Return> to reinsert the Newline you deleted. |
338 | 344 |
339 Remember that most Emacs commands can be given a repeat count; | 345 Remember that most Emacs commands can be given a repeat count; |
344 | 350 |
345 You've now learned the most basic way of typing something in | 351 You've now learned the most basic way of typing something in |
346 Emacs and correcting errors. You can delete by words or lines | 352 Emacs and correcting errors. You can delete by words or lines |
347 as well. Here is a summary of the delete operations: | 353 as well. Here is a summary of the delete operations: |
348 | 354 |
349 <Delete> delete the character just before the cursor | 355 <Delback> delete the character just before the cursor |
350 C-d delete the next character after the cursor | 356 C-d delete the next character after the cursor |
351 | 357 |
352 M-<Delete> kill the word immediately before the cursor | 358 M-<Delback> kill the word immediately before the cursor |
353 M-d kill the next word after the cursor | 359 M-d kill the next word after the cursor |
354 | 360 |
355 C-k kill from the cursor position to end of line | 361 C-k kill from the cursor position to end of line |
356 M-k kill to the end of the current sentence | 362 M-k kill to the end of the current sentence |
357 | 363 |
358 Notice that <Delete> and C-d vs M-<Delete> and M-d extend the parallel | 364 Notice that <Delback> and C-d vs M-<Delback> and M-d extend the parallel |
359 started by C-f and M-f (well, <Delete> is not really a control | 365 started by C-f and M-f (well, <Delback> is not really a control |
360 character, but let's not worry about that). C-k and M-k are like C-e | 366 character, but let's not worry about that). C-k and M-k are like C-e |
361 and M-e, sort of, in that lines are opposite sentences. | 367 and M-e, sort of, in that lines are opposite sentences. |
362 | 368 |
363 You can also kill any part of the buffer with one uniform method. | 369 You can also kill any part of the buffer with one uniform method. |
364 Move to one end of that part, and type C-@ or C-SPC (either one). | 370 Move to one end of that part, and type C-@ or C-SPC (either one). |
840 >> Now type C-s to start a search. SLOWLY, one letter at a time, | 846 >> Now type C-s to start a search. SLOWLY, one letter at a time, |
841 type the word 'cursor', pausing after you type each | 847 type the word 'cursor', pausing after you type each |
842 character to notice what happens to the cursor. | 848 character to notice what happens to the cursor. |
843 Now you have searched for "cursor", once. | 849 Now you have searched for "cursor", once. |
844 >> Type C-s again, to search for the next occurrence of "cursor". | 850 >> Type C-s again, to search for the next occurrence of "cursor". |
845 >> Now type <Delete> four times and see how the cursor moves. | 851 >> Now type <Delback> four times and see how the cursor moves. |
846 >> Type <Return> to terminate the search. | 852 >> Type <Return> to terminate the search. |
847 | 853 |
848 Did you see what happened? Emacs, in an incremental search, tries to | 854 Did you see what happened? Emacs, in an incremental search, tries to |
849 go to the occurrence of the string that you've typed out so far. To | 855 go to the occurrence of the string that you've typed out so far. To |
850 go to the next occurrence of 'cursor' just type C-s again. If no such | 856 go to the next occurrence of 'cursor' just type C-s again. If no such |
856 system "feature" called "flow control" is intercepting the C-s and not | 862 system "feature" called "flow control" is intercepting the C-s and not |
857 letting it get through to Emacs. To unfreeze the screen, type C-q. | 863 letting it get through to Emacs. To unfreeze the screen, type C-q. |
858 Then see the section "Spontaneous Entry to Incremental Search" in the | 864 Then see the section "Spontaneous Entry to Incremental Search" in the |
859 Emacs manual for advice on dealing with this "feature". | 865 Emacs manual for advice on dealing with this "feature". |
860 | 866 |
861 If you are in the middle of an incremental search and type <Delete>, | 867 If you are in the middle of an incremental search and type <Delback>, |
862 you'll notice that the last character in the search string is erased | 868 you'll notice that the last character in the search string is erased |
863 and the search backs up to the last place of the search. For | 869 and the search backs up to the last place of the search. For |
864 instance, suppose you have typed "c", to search for the first | 870 instance, suppose you have typed "c", to search for the first |
865 occurrence of "c". Now if you type "u", the cursor will move | 871 occurrence of "c". Now if you type "u", the cursor will move |
866 to the first occurrence of "cu". Now type <Delete>. This erases | 872 to the first occurrence of "cu". Now type <Delback>. This erases |
867 the "u" from the search string, and the cursor moves back to | 873 the "u" from the search string, and the cursor moves back to |
868 the first occurrence of "c". | 874 the first occurrence of "c". |
869 | 875 |
870 If you are in the middle of a search and type a control or meta | 876 If you are in the middle of a search and type a control or meta |
871 character (with a few exceptions--characters that are special in | 877 character (with a few exceptions--characters that are special in |