Mutt's own documentation provides a good introduction in 2.0 Getting Started. This is well worth skim reading, in particular the keystroke tables in each section: 2.1 Moving Around in Menus, early parts of 2.3 Reading Mail - The Index and Pager and 2.4 Sending Mail.
Here are a few keystrokes that I use frequently,
*
key goes to the last message in a folder.
123
goes to message number 123. This can be useful for
selecting deleted messages that are marked D as by default mutt
will skip these in up/down movements.
T
toggles quoted text: removes lines starting with
common characters like > -- especially handy for folks that
haven't yet learnt to trim their posts properly.
S
skips quoted text.
$
writes out ("commits") the current state of the
mailbox, incl. purging deleted messages. Useful when reading mail on
a shaky connection: annoying to reconnect and see big pile of
'unread' messages.
l
the limit command. Discussed next!
set sort=threads
(Internally mutt uses the In-Reply-To:
and
References:
headers which are set automatically when
replying by decent mail clients; it falls back by default on
Subject:
).
l
filters the display of messages.
Mutt's documentation doesn't make a big deal of "limit" nor introduces
it until well into the manual but it's one of mutt's real gems and is
well worth learning early.
For example, paul.makepeace
searches on subject, author and
email address limiting the display to those that match.
make
would return at least as many results. All searches
are case insensitive, and are regular expressions so ^
, $
, .
(period) etc
have special meanings. (Learn about 4.1 Regular
Expressions.)
Often this method is enough but it's possible to limit on more specific
patterns using a code prefixed with ~
(tilde). Here are
some more examples:
~s party
: messages with subject containing "party"
~d <2w
: messages less than two weeks old. Also: year, month,
week, day.
~t paulm
: To: matches paulm (useful for sent-mail folders)
~O
: old (i.e. unread but not new) messages. ~N
is new unread. ~U
is unread, i.e. both together.
~p
: messages addressed to you (useful if your inbox is
bombarded with mailing list or system report activity).
~p ~U
: for messages to you you haven't read yet.
.
: matches everything. In effect, remove the limit.
t
command tags a message and a *
will
toggle next to the message in the index page. You can also tag messages
using patterns (T
) just like limit. Once tagged a large
set of commands can operate on the tagged set as a whole by prefixing
the keystroke with ;
For example ;s
saves
tagged messages.
lwork
: limit messages to work and visually inspect the results.
~s work
- better!
T
: mutt uses your last expression for a tag-pattern. Since your
pattern is fine, press enter.
l.
: remove the limit, out of curiosity. You see scattered
tagged messages.
;d
$
keystroke.
D
("Delete messages
matching") but is not as interactive.
~s
and
~e
). Here's what I do,
h
Mailing-List: contact mailing-list-help@domain.tld
~B
"^paste-clipboard"
. Note:
~B
(search including headers)
^
to tie the match to the beginning
of line - this will dramatically speed the search up.
"
to enclose the pattern so I can have spaces in there, or else mutt will treat the second part as another search pattern.
;
) save (s
) them, ;s=Lists/mailing-list
$
c
changes to a
particular folder, relative to the directory mutt was started in. Mutt
can also be invoked with the -f
option to start with a particular
folder, e.g. mutt -f ~/mbox
There is no restriction (aside from user permissions) where folders
reside although mutt provides for storing them in a known place
specified by the folder
configuration which defaults to ~/Mail
. Folders under this
directory can then be referenced by prefixing the name with
=
so =Lists/mutt-users
is mutt-speak for
~/Mail/Lists/mutt-users
. This works with -f
too: mutt -f =work/realprogrammers
There are other 4.7 Mailbox
Shortcuts: notably !
is the user's mail spool
(MAIL
environment variable) and >
is the
mbox file.
A handy tip for your .muttrc
especially if you have
particularly large folders or are operating over a slow connection. The
read_inc
variable sets how often the
read counter is updated. The low default value (10) sprays characters at
the terminal, which can really drag.
c
(change-folder) will
default to the list of folders that have new messages, in the order they
appear on the mailboxes line. Space
cycles through them.
site:www.mutt.org
before your query.
Enjoy!