Emacs instructions 16th May See also, on piglet, /home/local/emacs/etc/FAQ To read manual on line, C-h i m emacs RET OPEN FILE: C-x C-f then type file name , use space or tab to ask for completions then press return You may open a file while already editing one. To see list of buffers, C-x C-b. To return to the editing of previous files, C-x C-f can be used to "find" already open files. Or you can switch buffer with C-x b or C-x 4 b to make a new window. To kill a buffer C-x k CREATE N WINDOWS: C-x CHANGE TO ANOTHER WINDOW IN SEQUENCE: C-x o MOVING AROUND CURSOR: C-p,n,f,b. Meta- does words instead of characters BEGINNING OF LINE: C-a END of LINE: C-e Meta- does sentences instead of lines. DOWN PAGE: C-v UP PAGE: M-v [M = Meta (diamond) BEGIN/END: M-< and M-> CENTRE PAGE on cursor: C-l HELP: C-h a ->> list of commands e.g. search, window To kill help window, C-x 1 C-h c - gives brief info C-h k gives more info C-h f gives info All commands can be invoked by the use of M-x TO GET OUT OF SOMETHING: C-g SAVE FILE: C-x C-s SAVE FILE AS: C-x C-w More: Escape key and Meta have the same function, except you can hold down Meta. Transpose chars: C-t Lines = C-x C-t words = ESC t Delete forward a letter: C-d Delete forward a word: M-d [this generalises for many things: Meta does words instead of letters] Delete forward to end of line C-k (seeveral C-k`s save all lines as a single block of retrievable text) Delete to end of sentence M-k Yank back killed text (eg killed words or more) C-y Yank back old killed text (after using C-y) M-y [M-y M-y M-y] Undo: C-x u alternative easier command = C-_ [UNDERSCORE] C- also seems to undo one char at a time Cut and paste: C-_ beginning point [SPACE] C-w cut to here Esc-w copy w/o cutting, as if cutting. C-y paste ["Insert"] C-x x# copy w/o cutting, to register # [# is any character] C-x g# insert register # C-x r copy rectangular region into register Find [Search] C-s [C-s again finds future occurrences of the same thing] --- what is the nice way to end such a search? ESC. And Delete moves you back through the sequence of things you found or C-r to search backwards. to cycle round the end of the document -- C-s again C-s C-s recalls the last thing you were searching for. C-k Kill rest of current line there are windows anbd buffers. C-x b cycles through the buffers. no, it toggles C-x C-b gives list of numbered buffers. No, named. C-x o is not really necesary if I use the mouse to shift attention. Exit C-x C-c Exit without killing emacs: C-z [usual background-ification] - starts a shell for you. Delete all blank lines here leaving one: C-x C-o How do you delete a line? How can I disable the nasty R keys when in emacs? Or how can I get them to do what I want. eg R13 = End, R7 = Home, R11 = C-l, which puts the cursor in the middle. R9 = page up, R15 = page down. Ins = addiotinal meta key. Make Shift-R10 and Shift R12 do end of lines. And make one to scroll the screen by an intermediate number of lines. Can I make Shift delete different from delete? How do Martin and David have mouse movement initiate scrolling? Is there a scroll bar option? To repeat a command C-u NUMBER Command. Alternatively M-NUMBER Command To stop hung emacs: C-g To discard half a command: C-g Auto-fill-mode: M-x auto-fill-mode [this is a toggle] Realign a paragraph: M-q, or ESC q Can you get the icon to have as its title the name of the file? In epoch? Practice text selection and insertion: OK, text can be selected with l and r buttons! you just can't see your selection. ANd you can't use a multi-click to select a word. And NB, insertion happens where you click the middle button - not where the cursor is. And I don't know how to delete the selected text. At least this copy facility does preserve wrapped lines correctly. From hope.caltech.edu!carlos Mon May 18 21:48:13 1992 To: mackay@ras.phy.cam.ac.uk Subject: Re: how do you kill? C-z 0 Note that if you try to kill the last remaining one, it won't let you. C. ps sorry about the passwd muckup! I kind of imagine you jumping up and down in your seat in exasperation. ;) To return to a marked location, use `C-u C-SPC' Yanking Earlier Kills --------------------- To recover killed text that is no longer the most recent kill, use the `M-y' command (`yank-pop'). It takes the text previously yanked and replaces it with the text from an earlier kill. So, to recover the text of the next-to-the-last kill, first use `C-y' to yank the last kill, and then use `M-y' to replace it with the previous kill. `M-y' is allowed only after a `C-y' or another `M-y'.