# some sane vim-like keybindings
bind index k previous-entry
bind index j next-entry
bind pager k previous-line
bind pager j next-line
bind index,pager g noop
bind pager gg top
bind index gg first-entry
bind pager G bottom
bind index G last-entry

# Scrolling
bind attach,browser,pager,index \CF next-page
bind attach,browser,pager,index \CB previous-page
bind attach,browser,pager,index \Cu half-up
bind attach,browser,pager,index \Cd half-down
bind browser,pager              \Ce next-line
bind browser,pager              \Cy previous-line
bind index                      \Ce next-line
bind index                      \Cy previous-line

bind index,pager \Cd purge-message

# Sidebar Navigation
bind index,pager <down> sidebar-next
bind index,pager <up> sidebar-prev
bind index,pager <right> sidebar-open

# index and pager shortcuts
bind index,pager @ compose-to-sender
bind index,pager R group-reply
bind index <tab> sync-mailbox
bind index <space> collapse-thread

# Sync all email
macro index,pager O "<shell-escape>mbsync -a<enter>" "run mbsync to sync all mail"

# Drafts
bind compose P postpone-message
bind index p recall-message
