Mutt pager/index view, and colour scheme

I had thought that my use of mutt was completely ordinary, but after pasting a screenshot of it:

screenshot of my mutt

into IRC for unrelated reasons, a number of people asked how I set it up like that. The answer is I read the manual!

But for those not interested in reading the manual, the image is of the pager view, i.e. what is used to view an individual message. The top few lines show a view of the index, i.e. the list of messages in the current folder. People have referred to this as a split window but it isn’t really as there is no way to make it “active” and give it commands that you would use in the index. It’s just for display purposes, but it does help to see where you are in the thread.

Adding:

set pager_index_lines=10

to your .muttrc will dedicate the top 10 lines of your pager view to this view of the index.

The colour scheme shown is determined by the following lines:

color header cyan black .
color header yellow black ^From
color header yellow black ^Subject
color body yellow black [_a-z\.\$A-Z0-9-]+@[a-zA-Z0-9\./\-]+
color body yellow black (http|ftp)://[_a-zA-Z0-9\?\=\&\@\%\#\:\,\./~\-]+
color quoted green black
color signature cyan black
color attachment yellow black
color tree white black
color indicator black cyan
color status yellow blue
color tilde blue black
color normal white black
color index green black ~N

The lines with regular expressions just pick out things like email addresses and URLs. The last line makes new (unread) mails stand out in the index view. The regular expressions could be improved but really, they work well enough for me. I haven’t edited this part of the config since 2005!

5 thoughts on “Mutt pager/index view, and colour scheme

  1. OMG! I have Mutt configured like crazy, but I have never experimented with pager_index_lines. That is damn sexy! 🙂 Thank you.

    (Beats the hell out of KMail. 🙂 )

  2. Thanks for pager_index_lines!!

    But, how do I scroll down in a mail. I can scroll between the mails. But when I choose a big mail I would like to scroll down in that mail! But how?

  3. @Thomas, personally I use the Return key to scroll down line by line, or space bar to scroll down by a page. PgDn/PgUp also work to go down/up by larger amounts.

    If your PgDn/PgUp don’t do that already then you may need:

    bind index next-page
    bind index previous-page

    in your config.

  4. @Thomas.

    for up and down in a mail i’ve configured
    i’ve configured same like vim :

    with the following .
    bind pager \Cu half-up
    bind pager \Cd half-down
    bind index \Cu half-up
    bind index \Cd half-down

    to have nice colors for mail adresses and url links:

    color body blue white [_a-z\.\$a-z0-9-]+@[a-za-z0-9\./\-]+
    # ^ addresse mail
    color body blue white (http|ftp)://[_a-zA-Z0-9\?\=\&\@\%\#\:\,\./~\-]+
    # ^ lien url

    toshiro

Leave a Reply

Your email address will not be published. Required fields are marked *