Redefine M-<
and M->
(or any keys bound to beginning-of-buffer
and end-of-buffer
) for some modes so that point moves to meaningful
lines. The real beginning and end of buffers are still accessible by
pressing the same key again.
In particular, these modes are supported:
- in dired-mode,
M-<
(respectivelyM->
) goes to the first (respectively last) file, ignoring heading,.
and..
; - in message-mode,
M-<
goes to the first line of the message body (after headings) whileM->
goes to the last line before message signature; - in occur-mode,
M-<
(respectivelyM->
) goes to the first (respectively last) match;
Other supported modes are ibuffer-mode
, vc-dir-mode
, bs-mode
,
recentf-dialog-mode
, org-agenda-mode
, compilation-mode
,
notmuch-search-mode
, elfeed-mode
, and prodigy-mode
.
Use melpa.
You can activate beginend for all modes it supports by customizing the
variable beginend-global-mode
(M-x customize-variable RET
beginend-global-mode RET
) or by adding this line to your
configuration file:
(beginend-global-mode)
You can also decide to only activate beginend for some of its
supported modes. Activate the dedicated beginend mode then (e.g.,
beginend-dired-mode
).
At this point, newly opened supported buffers will get improved
versions of M-<
and M->
(or any keys bound to
beginning-of-buffer
and end-of-buffer
).
Dired-mode: Message mode: Occur mode:
Yes, please do! See CONTRIBUTING for guidelines.
See COPYING. Copyright (c) 2017 Damien Cassou and Matus Goljer.