home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / gnu / emacs / help / 4069 < prev    next >
Encoding:
Text File  |  1992-09-10  |  1.8 KB  |  42 lines

  1. Newsgroups: gnu.emacs.help
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!usc!sdd.hp.com!spool.mu.edu!darwin.sura.net!Sirius.dfn.de!zrz.tu-berlin.de!mailgzrz.tu-berlin.de!nickel
  3. From: nickel@cs.tu-berlin.de (Juergen Nickelsen)
  4. Subject: Re: Equivalents to vi's H, M, L Commands?
  5. In-Reply-To: mac@crchh570.BNR.CA's message of 9 Sep 92 18:35:31 GMT
  6. Message-ID: <NICKEL.92Sep10183434@desaster.cs.tu-berlin.de>
  7. Lines: 27
  8. Sender: news@mailgzrz.tu-berlin.de (News Manager)
  9. Nntp-Posting-Host: desaster.cs.tu-berlin.de
  10. Reply-To: nickel@cs.tu-berlin.de
  11. Organization: STONE Project, Technical University of Berlin, Germany
  12. References: <1992Sep09.183531.5615@bnr.ca>
  13. Date: Thu, 10 Sep 1992 16:34:38 GMT
  14.  
  15. In article <1992Sep09.183531.5615@bnr.ca> mac@crchh570.BNR.CA (Michael
  16. Campbell) writes:
  17.  
  18. > Does anyone know of emacs functions that perform a similar function to 
  19. > the vi commands H, M, and L (Home, Middle, and Last)? These functions 
  20. > move the cursor to the top of the screen (Home), the middle line of the 
  21. > screen (Middle), and the last line of the screen (Last). They do not 
  22. > effect vi's position in the file - they simply allow you to move the 
  23. > cursor around the currently displayed screen. Please post any replies
  24. > to this newsgroup. Thanks!
  25.  
  26. Two solutions have already been posted -- both unnecessary, because
  27. this functionality is already available in Emacs. Look at the
  28. documentation to the function "recenter", usually bound to C-l:
  29.  
  30.     Center point in window and redisplay screen.  With ARG, put point
  31.     on line ARG.  The desired position of point is always relative to
  32.     the current window.  Just C-u as prefix means put point in the
  33.     center of the screen.  No arg (i.e., it is nil) erases the entire
  34.     screen and then redraws with point in the center.
  35.  
  36. So  C-l is equivalent to M
  37. M-- C-l is equivalent to L
  38. M-0 C-l is equivalent to H.
  39.  
  40. --
  41. Juergen Nickelsen
  42.