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

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

RE: Shortcut to have the cursor move X nu,ber of lines up or down


From: Drew Adams
Subject: RE: Shortcut to have the cursor move X nu,ber of lines up or down
Date: Sat, 30 Mar 2013 07:36:09 -0700

> 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.

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))




reply via email to

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