Elric's random thoughts in idle times

"Why stop now, when I'm just starting to hate it?" – Marvin the robot

macros and keybindings

leave a comment »

This is my file for macros and keybindings. Please note that paths are longer because I have two accounts. You may skip the “GMAIL/” part in the path if set folder = is set to that maildir (as in set folder = ~/.mail/GMAIL). If you have a multiple account setting you’ll need to set set folder = ~/.mail/.

##########################################################################
# Mutt general keybinds

macro index,pager I '<shell-escape> offlineimap -o<enter>'

macro index,pager A "<pipe-message>abook --add-email<return>" "add the sender address to abook"
macro generic,index,pager \ca "<shell-escape>abook<return>" "launch abook"

# View URLs inside Mutt with urlview
macro index \cb "|urlview\n"
macro pager \cb "|urlview\n"
#and urlscan
#macro index,pager \cb "<pipe-message> urlscan<Enter>" "call urlscan to extract URLs out of a message"
#macro attach,compose \cb "<pipe-entry> urlscan<Enter>" "call urlscan to extract URLs out of a message"

Please note the <quote-char> in the macros. You WILL NOT need this if your folders don’t contain spaces, or if it works just fine with you.

# Navigation.
macro index,pager gi "<change-folder> =GMAIL/INBOX<enter>" "Go to inbox"
macro index,pager ga "<change-folder> =GMAIL/[Google<quote-char> Mail].All<quote-char> Mail<enter>" "Go to all mail"
macro index,pager gs "<change-folder> =GMAIL/[Google<quote-char> Mail].Sent<quote-char> Mail<enter>" "Go to Sent Mail"
macro index,pager gd "<change-folder> =GMAIL/[Google<quote-char> Mail].Drafts<enter>" "Go to drafts"

# Spam
macro index,pager S "<save-message>=GMAIL/[Google<quote-char> Mail].Spam/<enter>"

# Provide some "on-line" help.
macro generic,index,pager \cv "<shell-escape>gvim ~/Books/Linux/Apps/mutt-manual.txt<enter>"

# Vim-like bindings

bind pager / search
bind pager <up> previous-line
bind pager <down> next-line
bind pager k previous-line
bind pager j next-line
bind pager gg top
bind pager G bottom
bind index gg first-entry
bind index G last-entry
#########################################################################

Back to main

Advertisements

Written by elric80

November 21, 2009 at 4:57 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: