From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: Alan Mackenzie <acm@muc.de>
Cc: help-gnu-emacs@gnu.org, Ye ilho <iy2110@columbia.edu>
Subject: Re: How to move the cursor to the bottom of the screen?
Date: Thu, 10 Jan 2008 10:32:43 +0100 [thread overview]
Message-ID: <87ir22rpok.fsf@dell.linuxdev.us.dell.com> (raw)
In-Reply-To: <20080110081546.GA1360@muc.de> (Alan Mackenzie's message of "Thu, 10 Jan 2008 08:15:46 +0000")
Alan Mackenzie <acm@muc.de> writes:
> 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)
Thats much better than the original keys M-- M-r and C-n M-r
I change it a little like that we can do C-u n C-right or left
(defun screen-top (&optional n)
"Move the point to the top of the screen."
(interactive "p")
(move-to-window-line (or n 0)))
(defun screen-bottom (&optional n)
"Move the point to the bottom of the screen."
(interactive "P")
(move-to-window-line (- (prefix-numeric-value n))))
>
>
> 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?
--
A+ Thierry
Pub key: http://pgp.mit.edu
next prev parent reply other threads:[~2008-01-10 9:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-09 17:58 How to move the cursor to the bottom of the screen? Ye ilho
2008-01-09 18:44 ` B. Smith-Mannschott
2008-01-09 19:07 ` Ye ilho
2008-01-09 19:15 ` Lennart Borgman (gmail)
2008-01-09 19:23 ` Ye ilho
2008-01-10 8:15 ` Alan Mackenzie
2008-01-10 9:32 ` Thierry Volpiatto [this message]
[not found] ` <mailman.5947.1199954002.18990.help-gnu-emacs@gnu.org>
2008-01-10 20:24 ` OT: Torturing Ancient Judeans (was: How to move the cursor to the bottom of the screen?) Joel J. Adamson
[not found] ` <mailman.5934.1199906623.18990.help-gnu-emacs@gnu.org>
2008-01-09 22:48 ` How to move the cursor to the bottom of the screen? Barry Margolin
2008-01-10 4:34 ` Sanjeev Kumar.S
2008-01-10 9:05 ` Dmitri Minaev
[not found] <mailman.5929.1199901491.18990.help-gnu-emacs@gnu.org>
2008-01-09 19:01 ` Exal de Jesus Garcia Carrillo
2008-01-10 16:06 ` Stefan Kamphausen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ir22rpok.fsf@dell.linuxdev.us.dell.com \
--to=thierry.volpiatto@gmail.com \
--cc=acm@muc.de \
--cc=help-gnu-emacs@gnu.org \
--cc=iy2110@columbia.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).