[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to position cursor at top/middle/bottom of the current screen? (
From: |
Bastien |
Subject: |
Re: how to position cursor at top/middle/bottom of the current screen? ( H / M / L in Vi) |
Date: |
Thu, 09 Oct 2008 01:29:28 +0200 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) |
"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
> David Lam wrote:
>> like... theres M-< and M->, but those move to the cursor to the
>> /very/ top/bottom of the file
>>
>> i wanna just move the cursor relative to the current text on the
>> screen... is there a built-in function for this?
>
> Ehum, yes, if you use Viper at least... ;-)
>
> It is actually very good if you know vi.
>
> Otherwise try the command move-to-window-line.
You can easily define these two commands:
(defun move-to-window-first-line ()
(interactive)
(move-to-window-line 0))
(defun move-to-window-last-line ()
(interactive)
(move-to-window-line -1))
... then bind them to what you want.
--
Bastien