help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to move the cursor to the bottom of the screen?


From: Alan Mackenzie
Subject: Re: How to move the cursor to the bottom of the screen?
Date: Thu, 10 Jan 2008 08:15:46 +0000
User-agent: Mutt/1.5.9i

Hi, Ye!

On Wed, Jan 09, 2008 at 02:23:38PM -0500, Ye ilho wrote:
> > > I am simply trying to go to the top/middle/bottom of the screen I see
> > > at the moment.
> > > I also tried your suggestion but that will take me to the
> > > beginning/end of buffer but not necessarily what I see on the screen
> > > at the moment.

> >
> >
> > Try

> >    M-r
> >    C-- M-r
> >    C-1 M-r


> Thank you! That was what I was looking for.

That's not quite what you were looking for - You said "in one
keystroke".  You can get this by having special commands for this.  Here
are the commands I use:


(defun screen-top ()
  "Move the point to the top of the screen."
  (interactive)
  (move-to-window-line 0))

(defun screen-bottom ()
  "Move the point to the bottom of the screen."
  (interactive)
  (move-to-window-line -1))
            
(global-set-key [C-left] 'screen-top)
(global-set-key [C-right] 'screen-bottom)


Copy these lines into your .emacs file (if necessary, create this file
by doing C-x C-f ~/.emacs).  C-<left> will then go to top of screen,
C-<right> to bottom of screen.  Modify the last two of these lines if
you prefer different key sequences.

> -- 
> YES, JESUS LOVES YOU, TOO.
> For God so loved the world that he gave his one and only Son, that
> whoever believes in him shall not perish but have eternal life(John
> 3:16).

This is very off-topic, but I've never understood the logic connecting
the second bit of that sentence to the first.  Couldn't God have somehow
arranged eternal life without being complicit in torturing somebody to
death first?

-- 
Alan Mackenzie (Nuremberg, Germany).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]