From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bastien 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:29:28 +0200 Message-ID: <87r66qaco7.fsf@gnu.org> References: <4f6ab4670810081609l539df820m61c2489a63c73b9c@mail.gmail.com> <48ED4048.5060900@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1223508604 22496 80.91.229.12 (8 Oct 2008 23:30:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 8 Oct 2008 23:30:04 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: "Lennart Borgman \(gmail\)" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Oct 09 01:31:01 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 1KniUd-0002Ip-GO for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Oct 2008 01:30:59 +0200 Original-Received: from localhost ([127.0.0.1]:54933 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KniTZ-0005Re-HC for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Oct 2008 19:29:53 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KniTG-0005RZ-Dg for help-gnu-emacs@gnu.org; Wed, 08 Oct 2008 19:29:34 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KniTE-0005RN-0c for help-gnu-emacs@gnu.org; Wed, 08 Oct 2008 19:29:33 -0400 Original-Received: from [199.232.76.173] (port=36704 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KniTD-0005RK-SB for help-gnu-emacs@gnu.org; Wed, 08 Oct 2008 19:29:31 -0400 Original-Received: from fg-out-1718.google.com ([72.14.220.157]:38646) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KniTE-0004pk-26 for help-gnu-emacs@gnu.org; Wed, 08 Oct 2008 19:29:32 -0400 Original-Received: by fg-out-1718.google.com with SMTP id l26so3161688fgb.30 for ; Wed, 08 Oct 2008 16:29:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:received:to:cc:subject :in-reply-to:references:user-agent:date:message-id:mime-version :content-type:from; bh=51yaGHK0c6AjGsxYZoyK4Gny+Kp90bKDjwVrJiaxcZU=; b=a3sl2c3ByjXIxUl5hNFb/3cx4YHKxOQA72mp9PA0U/izgwMMsyZyJB1Sy6I2OFRhbf 1hg7odEBpeDnYLD0DY6VL14JQC1PDz/dfVBFdYWcglYV7FOBb1i4qQG824fl82r22Yu5 wAempb0hAZRMRIXwDphFr94zDcz+WZtKHoplo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=to:cc:subject:in-reply-to:references:user-agent:date:message-id :mime-version:content-type:from; b=fehULdggXnXRG9wImZ71x7VpduV0Lb31dzOWSce5klq3J1+lU6O/YzGZP8hX+2XH3l RJO7Z9soZ+pWN4LEwJ/T4nSHxchSilw9P097OhMzdEzFbndTFjWBgbZdFb3w7GyjUnIS Z83JE7HMgQdPHyo3mWUEbJsQu0T8G/XJMOO6A= Original-Received: by 10.86.33.19 with SMTP id g19mr8136654fgg.13.1223508570641; Wed, 08 Oct 2008 16:29:30 -0700 (PDT) Original-Received: from bzg (61.52.94-79.rev.gaoland.net [79.94.52.61]) by mx.google.com with ESMTPS id d4sm20164563fga.5.2008.10.08.16.29.28 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 08 Oct 2008 16:29:29 -0700 (PDT) Original-Received: by bzg (Postfix, from userid 1000) id 1380C16222A; Thu, 9 Oct 2008 01:29:28 +0200 (CEST) In-Reply-To: <48ED4048.5060900@gmail.com> (Lennart Borgman's message of "Thu, 09 Oct 2008 01:20:40 +0200") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) 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:58585 Archived-At: "Lennart Borgman (gmail)" writes: > David Lam wrote: >> like... theres M-< and M->, but those move to the cursor to the >> /very/ top/bottom of the file >> >> i wanna just move the cursor relative to the current text on the >> screen... is there a built-in function for this? > > Ehum, yes, if you use Viper at least... ;-) > > It is actually very good if you know vi. > > Otherwise try the command move-to-window-line. You can easily define these two commands: (defun move-to-window-first-line () (interactive) (move-to-window-line 0)) (defun move-to-window-last-line () (interactive) (move-to-window-line -1)) ... then bind them to what you want. -- Bastien