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

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

Re: how to position cursor at top/middle/bottom of the current screen? (


From: Nikolaj Schumacher
Subject: Re: how to position cursor at top/middle/bottom of the current screen? ( H / M / L in Vi)
Date: Thu, 09 Oct 2008 01:35:28 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (darwin)

"David Lam" <david.k.lam1@gmail.com> wrote:

> i wanna just move the cursor relative to the current text on the screen...
> is there a built-in function for this?

I only recently found this, even though it is prominently bound to M-r.
The command is `move-to-window-line', which moves to the middle.

For top, bottom:

(defun move-to-top ()
  (interactive)
  (move-to-window-line 0))

(defun move-to-bottom ()
  (interactive)
  (move-to-window-line -1))


regards,
Nikolaj Schumacher




reply via email to

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