all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How do you scroll the screen without moving the cursor ? (the C-E and C-Y keys in vi)
@ 2008-10-02 22:11 David Lam
  0 siblings, 0 replies; 7+ messages in thread
From: David Lam @ 2008-10-02 22:11 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 209 bytes --]

mmm i am definitely an emacs noob

i saw this... http://www.wlindley.com/gnu/vi  and in the first two rows
theres no listed equivalent

theres gotta be some binding or some way to do it i figure though right?

[-- Attachment #2: Type: text/html, Size: 297 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How do you scroll the screen without moving the cursor ? (the C-E and C-Y keys in vi)
       [not found] <mailman.108.1223009092.25473.help-gnu-emacs@gnu.org>
@ 2008-10-03  5:46 ` Livin Stephen
  2008-10-03  6:42   ` zoltan
  2008-10-04 21:11 ` Rodolfo Medina
  2008-10-10 21:49 ` Joe Casadonte
  2 siblings, 1 reply; 7+ messages in thread
From: Livin Stephen @ 2008-10-03  5:46 UTC (permalink / raw)
  To: help-gnu-emacs


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.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How do you scroll the screen without moving the cursor ? (the C-E and C-Y keys in vi)
  2008-10-03  5:46 ` Livin Stephen
@ 2008-10-03  6:42   ` zoltan
  0 siblings, 0 replies; 7+ messages in thread
From: zoltan @ 2008-10-03  6:42 UTC (permalink / raw)
  To: help-gnu-emacs

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How do you scroll the screen without moving the cursor ? (the C-E and C-Y keys in vi)
       [not found] <mailman.108.1223009092.25473.help-gnu-emacs@gnu.org>
  2008-10-03  5:46 ` Livin Stephen
@ 2008-10-04 21:11 ` Rodolfo Medina
  2008-10-04 22:58   ` Rupert Swarbrick
  2008-10-10 21:49 ` Joe Casadonte
  2 siblings, 1 reply; 7+ messages in thread
From: Rodolfo Medina @ 2008-10-04 21:11 UTC (permalink / raw)
  To: help-gnu-emacs

...how do you scroll the screen without moving point, also in the sense that
you do, say, five times C-v and then five times M-v and find the cursor in the
*same* place as it was before the first C-v...?

I found two packages that do that: pager.el and scroll-in-place.el, but the
side unwished effect is that the `next-screen-context-lines' stops working
properly in TeX and info buffers: you don't have any more the two default lines
of continuity when scrolling by screenfuls, but less, and variable.

Anyone met the same problem?
Rodolfo


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How do you scroll the screen without moving the cursor ? (the C-E and C-Y keys in vi)
  2008-10-04 21:11 ` Rodolfo Medina
@ 2008-10-04 22:58   ` Rupert Swarbrick
  2008-10-05 10:48     ` Rodolfo Medina
  0 siblings, 1 reply; 7+ messages in thread
From: Rupert Swarbrick @ 2008-10-04 22:58 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 771 bytes --]

Rodolfo Medina <rodolfo.medina@gmail.com> writes:

> ...how do you scroll the screen without moving point, also in the
> sense that you do, say, five times C-v and then five times M-v and
> find the cursor in the *same* place as it was before the first C-v...?
>

I'm afraid I don't actually know the answer to this question (although
I'm sure there will be one). I was also slightly suprised when reading
it that this had never irritated me.

But then I realised what I do: Before starting to scroll, I hit C-Space
to set a mark. Then I wander round the file to my hearts content, not
even necessarily returning to where I started before hitting C-u C-Space
and being back and with point "unmoved".

Maybe this is a useful different way of solving your problem.

Rupert

[-- Attachment #2: Type: application/pgp-signature, Size: 314 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How do you scroll the screen without moving the cursor ? (the C-E and C-Y keys in vi)
  2008-10-04 22:58   ` Rupert Swarbrick
@ 2008-10-05 10:48     ` Rodolfo Medina
  0 siblings, 0 replies; 7+ messages in thread
From: Rodolfo Medina @ 2008-10-05 10:48 UTC (permalink / raw)
  To: help-gnu-emacs

Rodolfo Medina <rodolfo.medina@gmail.com> writes:

> ...how do you scroll the screen without moving point, also in the sense that
> you do, say, five times C-v and then five times M-v and find the cursor in the
> *same* place as it was before the first C-v...?
>
> I found two packages that do that: pager.el and scroll-in-place.el, but the
> side unwished effect is that the `next-screen-context-lines' stops working
> properly in TeX and info buffers: you don't have any more the two default
> lines of continuity when scrolling by screenfuls, but less, and variable.
>
> Anyone met the same problem?



Rupert Swarbrick <rswarbrick@gmail.com> writes:

> I'm afraid I don't actually know the answer to this question (although
> I'm sure there will be one). I was also slightly suprised when reading
> it that this had never irritated me.
>
> But then I realised what I do: Before starting to scroll, I hit C-Space
> to set a mark. Then I wander round the file to my hearts content, not
> even necessarily returning to where I started before hitting C-u C-Space
> and being back and with point "unmoved".
>
> Maybe this is a useful different way of solving your problem.



Hey, that's great!  Thanks
Rodolfo


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How do you scroll the screen without moving the cursor ? (the C-E and C-Y keys in vi)
       [not found] <mailman.108.1223009092.25473.help-gnu-emacs@gnu.org>
  2008-10-03  5:46 ` Livin Stephen
  2008-10-04 21:11 ` Rodolfo Medina
@ 2008-10-10 21:49 ` Joe Casadonte
  2 siblings, 0 replies; 7+ messages in thread
From: Joe Casadonte @ 2008-10-10 21:49 UTC (permalink / raw)
  To: help-gnu-emacs

I wrote these years ago; maybe they will help?


(defun scroll-in-place (scroll-up)
  "Scroll window up (or down) without moving point (if possible).

SCROLL-Up is non-nil to scroll up one line, nil to scroll down."
  (interactive)
  (let ((pos (point))
		(col (current-column))
		(up-or-down (if scroll-up 1 -1)))
	(scroll-up up-or-down)
	(if (pos-visible-in-window-p pos)
		(goto-char pos)
	  (if (or (eq last-command 'next-line)
			  (eq last-command 'previous-line))
		  (move-to-column temporary-goal-column)
		(move-to-column col)
		(setq temporary-goal-column col))
	  (setq this-command 'next-line))))

;;;; ------------------------------------------------------------------------
(defun scroll-up-in-place ()
  "Scroll window up without moving point (if possible)."
  (interactive)
  (scroll-in-place t))

;;;; ------------------------------------------------------------------------
(defun scroll-down-in-place ()
  "Scroll window up without moving point (if possible)."
  (interactive)
  (scroll-in-place nil))

(global-set-key (read-kbd-macro "M-<down>") 'scroll-up-in-place)
(global-set-key (read-kbd-macro "M-<up>") 'scroll-down-in-place)


--
Regards,


joe
Joe Casadonte
jcasadonte@northbound-train.com

------------------------------------------------------------------------------
         Llama Fresh Farms => http://www.northbound-train.com
    Ramblings of a Gay Man => http://www.northbound-train.com/ramblings
               Emacs Stuff => http://www.northbound-train.com/emacs.html
          Music CD Trading => http://www.northbound-train.com/cdr.html
------------------------------------------------------------------------------
                       Live Free, that's the message!
------------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-10-10 21:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-02 22:11 How do you scroll the screen without moving the cursor ? (the C-E and C-Y keys in vi) David Lam
     [not found] <mailman.108.1223009092.25473.help-gnu-emacs@gnu.org>
2008-10-03  5:46 ` Livin Stephen
2008-10-03  6:42   ` zoltan
2008-10-04 21:11 ` Rodolfo Medina
2008-10-04 22:58   ` Rupert Swarbrick
2008-10-05 10:48     ` Rodolfo Medina
2008-10-10 21:49 ` Joe Casadonte

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.