mirror of
https://github.com/soywod/himalaya.git
synced 2024-11-22 11:00:19 +00:00
45aac9fbec
0.5.0 came with the amazing option of reading the mail in the same view. The issue with this is, if you go back to the message list and read some new mail, it opens a new pane to read the new mail. This change follows the path of modern mail readers which have one pane to load the email in. Technically, this change closes any open "Himalaya read message" pane before creating a new one. This close-open should create the illusion of having the same pane reload the content. A possible extension of this would be to clear the contents of the pane, and re-use the same pane to load the new message. A good time to go this extension is if Himalaya chooses to use persistent connections to the mail server. |
||
---|---|---|
.. | ||
autoload/himalaya | ||
doc | ||
ftplugin | ||
lua/himalaya | ||
plugin | ||
syntax | ||
README.md |
Vim plugin
Installation
First you need to install and configure the himalaya
CLI. Then you can install
this plugin with your favorite plugin manager. For example with
vim-plug, add to your .vimrc
:
Plug 'soywod/himalaya', {'rtp': 'vim'}
Then:
:PlugInstall
It is highly recommanded to have this option on:
set hidden
Configuration
Mailbox picker provider
let g:himalaya_mailbox_picker = 'native' | 'fzf' | 'telescope'
Defines the provider used for picking mailboxes:
native
: a vim native inputfzf
: https://github.com/junegunn/fzf.vimtelescope
: https://github.com/nvim-telescope/telescope.nvim
If no value given, the first loaded (and available) provider will be used (fzf
telescope > native).
Telescope preview
let g:himalaya_telescope_preview_enabled = 0
Should enable telescope preview when picking a mailbox with the telescope provider.
Usage
List messages view
:Himalaya
Function | Default binding |
---|---|
Change the current mbox | gm |
Show previous page | gp |
Show next page | gn |
Read focused msg | <Enter> |
Write a new msg | gw |
Reply to the focused msg | gr |
Reply all to the focused msg | gR |
Forward the focused message | gf |
Download attachments from focused message | ga |
Copy the focused message | gC |
Move the focused message | gM |
Delete the focused message(s) | gD |
They can be customized:
nmap gm <plug>(himalaya-mbox-input)
nmap gp <plug>(himalaya-mbox-prev-page)
nmap gn <plug>(himalaya-mbox-next-page)
nmap <cr> <plug>(himalaya-msg-read)
nmap gw <plug>(himalaya-msg-write)
nmap gr <plug>(himalaya-msg-reply)
nmap gR <plug>(himalaya-msg-reply-all)
nmap gf <plug>(himalaya-msg-forward)
nmap ga <plug>(himalaya-msg-attachments)
nmap gC <plug>(himalaya-msg-copy)
nmap gM <plug>(himalaya-msg-move)
nmap gD <plug>(himalaya-msg-delete)
List mailboxes
Default behaviour (basic prompt):
With telescope support:
With fzf support:
Read message view
Function | Default binding |
---|---|
Write a new msg | gw |
Reply to the msg | gr |
Reply all to the msg | gR |
Forward the message | gf |
Download all msg attachments | ga |
Copy the message | gC |
Move the message | gM |
Delete the message | gD |
They can be customized:
nmap gw <plug>(himalaya-msg-write)
nmap gr <plug>(himalaya-msg-reply)
nmap gR <plug>(himalaya-msg-reply-all)
nmap gf <plug>(himalaya-msg-forward)
nmap ga <plug>(himalaya-msg-attachments)
nmap gC <plug>(himalaya-msg-copy)
nmap gM <plug>(himalaya-msg-move)
nmap gD <plug>(himalaya-msg-delete)
Write message view
When you exit this special buffer, you will be prompted 4 choices:
Send
: sends the messageDraft
: saves the message into theDrafts
mailboxQuit
: quits the buffer without savingCancel
: goes back to the message edition