From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nikolaj Schumacher Newsgroups: gmane.emacs.help 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 Message-ID: References: <4f6ab4670810081609l539df820m61c2489a63c73b9c@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1223508959 23365 80.91.229.12 (8 Oct 2008 23:35:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 8 Oct 2008 23:35:59 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: "David Lam" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Oct 09 01:36:57 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KniaO-0003w7-H7 for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Oct 2008 01:36:56 +0200 Original-Received: from localhost ([127.0.0.1]:47363 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KniZK-0006fa-I7 for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Oct 2008 19:35:50 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KniZ2-0006fV-U9 for help-gnu-emacs@gnu.org; Wed, 08 Oct 2008 19:35:32 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KniZ1-0006fJ-Bt for help-gnu-emacs@gnu.org; Wed, 08 Oct 2008 19:35:32 -0400 Original-Received: from [199.232.76.173] (port=54565 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KniZ1-0006fG-3A for help-gnu-emacs@gnu.org; Wed, 08 Oct 2008 19:35:31 -0400 Original-Received: from dd18200.kasserver.com ([85.13.138.168]:60342) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KniZ1-0005qC-5V for help-gnu-emacs@gnu.org; Wed, 08 Oct 2008 19:35:31 -0400 Original-Received: from thursday (BAH4242.bah.pppool.de [77.135.66.66]) by dd18200.kasserver.com (Postfix) with ESMTP id 058181831F7C6; Thu, 9 Oct 2008 01:35:35 +0200 (CEST) In-Reply-To: <4f6ab4670810081609l539df820m61c2489a63c73b9c@mail.gmail.com> (David Lam's message of "Wed\, 8 Oct 2008 16\:09\:34 -0700") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (darwin) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:58586 Archived-At: "David Lam" 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