[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Shortcut to have the cursor move X number of lines up or down
From: |
Gregory Benjamin |
Subject: |
Re: Shortcut to have the cursor move X number of lines up or down |
Date: |
Sat, 30 Mar 2013 13:43:15 -0700 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Sat, Mar 30, 2013 at 07:36:09AM -0700, Drew Adams wrote:
> > I would like to have the cursor move up or down X number of lines.
> > Kind of like C-n and C-p but instead of 1 line to be a
> > programmable X number of lines.
>
> `C-h k C-n' tells you that it runs the command `next-line', and that a prefix
> arg does what you want: e.g., `C-6 C-n' moves down 6 lines.
Wouldn't that be: 'C-u 6 C-n'? You can do 'C-u 6 C-p' to go up,
or 'C-u -6 C-n' to go up.
> If you want a command that always moves a particular number of lines then roll
> that argument into the definition.
>
> (defun six-lines-down ()
> "..."
> (interactive)
> (next-line 6))
>
Message not available