Suppose I want to jump x amount of lines up or down. Is there a convenient command for it?
1 Answer
To discover an existing command that moves up or down lines, use command apropos-command
, bound to C-h a
by default.
Commands involving lines often have line
in their name. So try that: C-h a line RET
. Among the displayed command names and their descriptions, you'll find next-line
and previous-line
.
c-u 5
and thenc-p
,c-n
or arrows. A shortcut would beM-5
and then navigation keys.(global-set-key (kbd "C-p") (lambda () (interactive) (previous-line 5)))
. But I would absolutely not recommend it. You should get used toc-u number
shortcuts which you can use in other places.[help]
. Tag[help]
is about Emacs commands that provide help such as what you're looking for, of whichapropos-command
is one.