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

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

Re: scroll buffer so that current line becomes first visible line


From: Giorgos Keramidas
Subject: Re: scroll buffer so that current line becomes first visible line
Date: Fri, 24 Apr 2009 18:28:58 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (berkeley-unix)

On Thu, 23 Apr 2009 21:18:20 -0500, Will Willis <will.willis@gmail.com> wrote:
> Hello, Is there a command/key binding to scroll my buffer so that the
> current line (the one with my cursor) becomes the first visible line
> in the window. This is akin to C-l, but instead of centering to the
> point, sticking the current line at the top of the window. I'm _not_
> looking to move the point to the first line (M-0 M-r).
>
> I'm not sure how this would work for shorter files, say only a few
> lines long, would a buffer who's length is shorter than the window
> height be able to scroll?

`C-l' works with a prefix too, so you can type `C-u 0 C-l' to redisplay
the buffer with the current line on top, or `C-u 30 C-l' to redisplay
everything and move the current line at line 30.



reply via email to

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