help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to scroll while keeping the position of the point with respect t


From: Ph . Ivaldi
Subject: Re: How to scroll while keeping the position of the point with respect to the text?
Date: Wed, 05 Sep 2007 22:38:53 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

Hello,

You tried scroll-in-place ?
 http://www.cs.utah.edu/~eeide/emacs/

In .emacs:
8<------8<------8<------8<------8<------8<------8<------8<------8<------
;; -------------------
;; * scroll-in-place *
;; scroll-in-place is a package that keeps the cursor on the same line
;; (and in the same column) when scrolling by a page using PgUp/PgDn.
(require 'scroll-in-place)
(defun scroll-move-up ()
  "* Scroll up without scroll-in-place."
  (interactive)
  (let ((scroll-in-place nil))
    (scroll-up 1)))
(defun scroll-move-down ()
  "* Scroll down without scroll-in-place."
  (interactive)
  (let ((scroll-in-place nil))
    (scroll-up -1)))
(global-set-key (kbd "<C-M-up>") 'scroll-move-up)
(global-set-key (kbd "<C-M-down>") 'scroll-move-down)

;; ----------------------------------
;; * naviguer dans une ligne longue *
;; C-up et C-down pour naviguer dans une ligne longue.
;; En plus le curseur reste immobile (en fait c'est un scroll!).
(defun move-one-up ()
  (interactive)
  (scroll-up 1))
(defun move-one-down ()
  (interactive)
  (scroll-up -1))
(global-set-key (kbd "<C-up>") 'move-one-down)
(global-set-key (kbd "<C-down>") 'move-one-up)
8<------8<------8<------8<------8<------8<------8<------8<------8<------

-- 
Regards,
   Philippe Ivaldi.
http://piprim.tuxfamily.org/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]