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

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

Re: Cursor stays in middle of frame vertically- minor mode?


From: Timothy Hobbs
Subject: Re: Cursor stays in middle of frame vertically- minor mode?
Date: Thu, 10 Apr 2008 21:14:09 -0700
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Jens Teich <spamtrap@jensteich.de> writes:

> David Bush <twixt@cstone.net> writes:
>
>> I want the cursor to stay in the middle line of my frame as I view and 
>> edit. 
>
> You might be looking for centered-cursor-mode, see
>
> http://www.emacswiki.org/cgi-bin/wiki/centered-cursor-mode.el
>
> Jens

You might also be interested in looking at this.
http://www.timthelion.com/cgi-bin/blosxom.cgi//emacs-polarity-reader.html
Though I'll note that my recenter-non-flashy is not perfect, and since the 
flashyness is only a problem with x11 emacs and I use -nw, I use at home:

(defadvice next-line (after scroll-with-cursor activate)
"scroll the window as you move the cursor"
  (recenter))

(defadvice previous-line (after scroll-with-cursor activate)
"scroll the window as you move the cursor"
        (recenter))

I don't use this, I lie, I'm using a small screen and so I keep the cursor at 
the very beginning and end of the screen like so:

(defadvice next-line (after scroll-with-cursor activate)
"scroll the window as you move the cursor"
  (recenter (window-height)))

(defadvice previous-line (after scroll-with-cursor activate)
"scroll the window as you move the cursor"
        (recenter 0))




reply via email to

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