all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Chris McMahan <first_initiallastname@one.dot.net>
To: help-gnu-emacs@gnu.org
Subject: Re: How do you scroll the screen without moving the cursor ? (theC-E and C-Y keys in vi)
Date: Fri, 03 Oct 2008 11:31:00 -0400	[thread overview]
Message-ID: <7sod21hf0r.fsf@one.dot.net> (raw)
In-Reply-To: mailman.142.1223043676.25473.help-gnu-emacs@gnu.org

If that's not what you have in mind, I've been using these for some
time. They keep the cursor in place and move the text underneath it.

(defun scroll-down-in-place (n)
  (interactive "p")
  (previous-line n)
  (scroll-down n))

(defun scroll-up-in-place (n)
  (interactive "p")
  (next-line n)
  (scroll-up n))

(global-set-key "\M-n" 'scroll-up-in-place)
(global-set-key "\M-p" 'scroll-down-in-place)

- Chris

"Parker, Matthew" <MParker@seic.com> writes:

> This might not be the most elegant... but it works... and I think it is what you have in mind...
>
> Add these to .emacs, and try Control-Alt-n or p
>
>   ;; Navigation Functions
>       (defun scroll-up-by-one-line()
>         "scroll ahead one line at a time"
>         (interactive)
>         (scroll-up 1))
>
>       
>       (defun scroll-down-by-one-line()
>         "scroll ahead one line at a time"
>         (interactive)
>         (scroll-down 1))
>
>   ;; key bindings
>
>       (global-set-key "\C-\M-n" 'scroll-up-by-one-line)
>       (global-set-key "\C-\M-p" 'scroll-down-by-one-line)
>
>
> Matthew Parker
>
> SEI  | 1 Freedom Valley Drive | Oaks, PA 19456 | p: 610-676-1279 | f: 484-676-1279 | www.seic.com
>
> -----Original Message-----
> From: help-gnu-emacs-bounces+mparker=seic.com@gnu.org [mailto:help-gnu-emacs-bounces+mparker=seic.com@gnu.org] On Behalf Of zoltan
> Sent: Friday, October 03, 2008 2:43 AM
> To: help-gnu-emacs@gnu.org
> Subject: Re: How do you scroll the screen without moving the cursor ? (theC-E and C-Y keys in vi)
>
> On Oct 3, 7:46 am, Livin Stephen <livin.step...@gmail.com> wrote:
>> On Oct 3, 3:11 am, "David Lam" <david.k.l...@gmail.com> wrote:
>>
>> >...
>> > i saw this...http://www.wlindley.com/gnu/vi and in the first two rows
>> > theres no listed equivalent
>> > ...
>>
>> David,
>>  C-v is how you scroll one-page-at-a-time, so with numerical arguments
>> ( "C-u 1" [ or "Cu -1" ] ),
>> here is how I would do it:
>>
>> C-u 1 C-v for "up", and
>> C-u -1 C-v for "down" .
>>
>> I don't know *any* lisp,
>>  so if I found myself wanting to do this a lot,
>>  I would probably create a macro and setup a key-binding.
>
> You can also use M-v to scroll up.
> And C-M-v to scroll down the next buffer
>
>

-- 
     (.   .)
  =ooO=(_)=Ooo=====================================
  Chris McMahan | first_initiallastname@one.dot.net
  =================================================


       reply	other threads:[~2008-10-03 15:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.142.1223043676.25473.help-gnu-emacs@gnu.org>
2008-10-03 15:31 ` Chris McMahan [this message]
2008-10-03 16:09   ` How do you scroll the screen without moving the cursor ? (theC-E and C-Y keys in vi) Paul R
2008-10-03 19:57     ` How do you create a "cscope buffer window" in ecb ? - very useful Sanjeev Kumar.S
     [not found]   ` <mailman.153.1223050175.25473.help-gnu-emacs@gnu.org>
2008-10-03 20:07     ` How do you scroll the screen without moving the cursor ? (theC-E and C-Y keys in vi) Chris McMahan
2008-10-04  0:57       ` David Lam
2008-10-04  9:03       ` Paul R
2008-10-04 21:24     ` Livin Stephen
2008-10-03  6:42 How do you scroll the screen without moving the cursor ? (the C-E " zoltan
2008-10-03 14:20 ` How do you scroll the screen without moving the cursor ? (theC-E " Parker, Matthew

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7sod21hf0r.fsf@one.dot.net \
    --to=first_initiallastname@one.dot.net \
    --cc=help-gnu-emacs@gnu.org \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.